by kaba0 · 4y ago · 0 comments
That’s just.. false. Languages compile to machine code, one way or another. Java’s JIT compiler doesn’t create C code, it creates machine code. So it could very well be written in brainfuck, it could still be theoretically better than C.
In the Java case, the JIT performs a runtime analysis. Without wanting to making any assertions about overall performance here, there exists a non-zero set of programs for which runtime optimisation is superior to static compiler analysis.
What JVM wins in PGO, it loses in other areas, and the end result is often still much slower.
No matter PGO these and similar examples can’t be done without self-modifying code, while java with JIT is sort of that in a way.