The Problems With Clojure AOT Compilation.
- 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
- 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.
- Clojure’s compiler is transitive.
- Some interest solutions to this
- Lein hacks and work arounds
- Pithy summary
- What are alternatives to AOT compilation?
- What does responsible use of AOT look like?
- Maintaince burden of AOT