Slashdot Mirror


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?"

3 of 57 comments (clear)

  1. Let me clarify by p3d0 · · Score: 4, Informative
    If you can show me a commercial JIT compiler that doesn't already do this, I'll eat my hat. What you call "dynamic compilation" is so routine and mundane that when people talk about "JIT compilers" these days, that is exactly what they are talking about. Nobody blindly compiles on the first invocation of a method any more.

    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....
  2. Re:What's the point in Java bytecode anyway? by p3d0 · · Score: 5, Informative

    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....
  3. Re:Introspective behaviour by p3d0 · · Score: 3, Informative
    Think about usage patterns, maybe I am wrong but no actual VM execution model adapts program execution at running/history characteristics.
    Yep, I think you're wrong. Look up "value profiling" for instance. It means finding values that are effectively constant on a particular run of a program, and recompiling that program on the assumption that the value will indeed be constant.

    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....