JVM JIT’ting Basics

A weekly podcast with Cliff Click talking about all things to do with programming, programmers and computer performance.

This is a short talk Java Virtual Machine JIT’ting basics, taking you through the entire compiled code lifetime.

 

One thought on “JVM JIT’ting Basics

  1. Thanks, Cliff! Just listened to this. It was a very high level explanation for me, a lot of things I already knew, but your perspective added a lot.

    I’ve actually been working with SSA form recently as a macro transformation in user space. Very much learning as I go. I had to read a little about the LLVM IR to understand the format, which was a bit daunting, but the IR I’m using myself is extremely domain specific: optimized for a handful of computer algebra and vector calculus functions over multiple variables. Since it’s embedded in Lisp code my tendency is to want to pattern match on the basic blocks as if they’re s-expressions rather than using graph reduction, but I knew if I didn’t at least use a state machine structure I would never be able to handle certain control flow (anything non-local even) and it could be more like operator overloading with constant folding.

    I’ve mostly learned source optimizations from Scheme to C compilers, although it’d probably be informative to write one in ML at this point, and one difficulty between Clojure and other Lisps is that the argument list is actually just syntax rather than an element in a linked list. This is bringing a point I think about a lot to the forefront: how function arguments generally have a very specific structure that resists being formalized. Currying might be simpler, but it only makes order more difficult. Inside the scope of referentially transparent functions argument lists are like keys for recursively tracing bound variables. I’ve found De Bruijn indices useful for this in that they eliminate the global nature of lambda binders, i.e. you never know what level a variable was bound at, and makes rearranging them a combinatoric problem—the same as in multivariable calculus with Faà di Bruno’s formula.

    Again, great podcast. I’m excited to hear more.

Leave a Reply

Your email address will not be published. Required fields are marked *