All true.
What C/C++ weenies often don't appreciate is how much C/C++ is a pessimising language - because the compiler can't /statically/ prove that optimisations are possible.
As an example of how bad C/C++ is, consider the unexpected findings of the Dynamo compiler from HPLabs.`
1 Take optimised C running on a PARISC machine M: performance X. 2 Now /emulate/ M running on M, running that C code: performance significantly worse than X, of course. 3 Instrument the executing C code using the same techniques in Java runtimes. 4 Optimise the binaries based on that new runtime knowledge. 5 Now /emulate/ M running the newly optimised knowledge: performance is similar to X, give or take.In other words, C/C++ pessimisation is equivalent to interpreting/emulating the hardware in software.
Alternatively, Java-like runtime optimisations can turn -O2 code into -O4 code - without the nasal demons that often inhabit that territory!