JIT vs AOT Compilation
jg21 writes "This article on "Penguin-Driven" JVMs takes a look the performance of Java GUI applications based on the JFC/Swing API, and contends that the JIT-powered JVMs can't match a JVM with an ahead-of-time compiler ported to the Linux/x86 platform. With AOT compilation, says the CTO who has written this piece, real-world Swing applications performed perceivably faster. One is left wondering, will we now see the 'microbenchmark war' carried into the Linux camp?"
What you have mentioned is not the crux of the problem. I can't say much more because I do confidential work on IBM's JIT compiler.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
It is parse trees. It's stack-based, which is pretty much just a post-order traversal of expression trees. Think of bytecode as a file format for describing expression trees.
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
For instance, imagine the UNIX "wc" (word count) program were written in Java. An advanced JIT compiler could tell, for instance, that you have specified the "-l" option, and therefore you only need to count lines. The portions of the program that count letters and words would get removed as dead code, which probably speeds up the inner loop a great deal.
Moden JIT compilers produce self-profiling code, and then re-compile with the profiling information to produce a specialized version of the code that will run faster under the current conditions.
If that's not the "introspection" you're talking about, then perhaps I have misunderstood. Can you give an example?
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....