> Most compilers I know of do register allocation better than nearly all humans where optimization is important.
Nowadays yes, you are forgetting C has 40 years of research into compiler optimization.
We could easily beat the register allocator in the 90's with Assembly coding, specially in x86.
There is a quote from a famous woman in compiler research from the mid-80's, where she claims C semantics have thrown the optimization research back to the dinosaur age.
Sadly I cannot find it, as I don't remember the exact words.
> Aliasing is a problem, but I don't think it's strictly inherent to C.
Most languages have stricter semantics for aliasing and do not decay arrays into pointers.
Also they tend to have better type information, which can help the optimizer.
But that is a talk for other day.