Just embedding and reusing the compiler in the Gradle daemon process instead of spawning a fresh JVM instance each time would probably help a lot, allowing the JVM's JIT compiler kick in. (I made an attempt to implement that, but there were some issues with process-global LLVM state not being reset properly that I couldn't resolve.)