I think you're missing the point here.
A C program that accesses the memory will do so in an extremely predictable way, if I lay out a memory structure, a piece of code and an access pattern then I can be very sure about how that will interact with things like the caches.
In other languages where there is more 'under the hood' that is a lot harder.
Libraries don't enter in to the problem, that's another level altogether.
While it's true that library code written by third parties might be less (or more) efficient than the code you wrote, even those libraries will have the luggage of the underlying implementation of the language.
In C there is no implementation underneath, it is a 1:1 correspondence with machine instructions.
That is the reason that kernel code tends to be written in C.