Compiling a Compiler, or How We Doubled the Speed of the Java Compiler (javac)
summary
The talk describes how Axiom JDK used Axiom NIK Pro AOT compilation to convert javac into native machine code, doubling compilation speed and reducing memory and CPU use. The approach works because javac mostly avoids Java Reflection; when reflection-based features (like -processor) are needed, the launcher falls back to the standard Java javac. The presentation includes statistics, alternative optimization methods for Java applications, and discussion of CI resource savings.
AI-written summary · about
chapters (29)
- 0:00Introduction
- 1:04Faster builds motivation
- 3:07What is compilation
- 6:39Compiler pipeline stages
- 11:59javac as Java app
- 16:17Goal: faster javac
- 17:21Bootstrapping javac
- 18:03CDS for javac
- 19:09Profiling javac with perf
- 21:41AOT compilation approach
- 23:06Native javac with AOT
- 24:31Benchmarking native javac
- 27:02Testing in Docker
- 29:06Maven/Gradle comparison
- 31:58Limitations and trade-offs
- 33:01Results and benefits
- 34:07When to use AOT javac
- 35:12Q&A
- 36:38Q&A: Personal usage
- 36:59Q&A: Optimization time
- 37:40Q&A: Cloud functions
- 38:02Q&A: Performance impact
- 38:22Q&A: 20% speedup source
- 39:25Q&A: Liqor usage
- 40:51Q&A: AOT for regular apps
- 41:32Q&A: Monitoring native javac
- 42:15Q&A: Compilation server
- 43:39Q&A: Top 3 optimizations
- 44:00Q&A: GraalVM comparison
