Instantly share code, notes, and snippets.

@hiredman hiredman/aot.org
Created Aug 23, 2016

Embed
What would you like to do?

The Problems With Clojure AOT Compilation.

  1. The name is not clear.
    • The name is short hand for something, but it can easily be bandied about and ends up being used without understanding what it signifies.
    • The compilation model
      • reader
      • compiler
        • not interpreted
      • the jvm executes bytecode
      • AOT compilation saves the output of the compiler so it can be executed later instead of immediately.
    • AOT performance advantages
      • start up time
  2. The ABI is not stable.
    • ABI is Application Binary Interface
    • Can mean a lot of things, and I am sort of abusing it using it here.
    • In this case I mean how Clojure functions are linked to each other, how they are invoked and how they are looked up.
      • similar to discussions of calling conventions if you are familiar with that.
    • Changes to how functions are linked is kind of hot topic right now
      • lazy loading
      • performance
        • differences between Clojure class size and Java
    • Unstable abi means code compiled with Clojure version X is incompatible with code compiled with Clojure version Y
      • Most clojure code will work with many different versions of Clojure.
      • Once you AOT compile a library though, consumers can only reliable use the library with the same version of Clojure it was initially compiled with.
  3. Clojure’s compiler is transitive.
    • Some interest solutions to this
    • Lein hacks and work arounds
  4. Pithy summary
  5. What are alternatives to AOT compilation?
  6. What does responsible use of AOT look like?
  • Maintaince burden of AOT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment