Compiling Scala Faster with GraalVM
summary
GraalVM plus its Native Image tool compiles Scala projects faster: JVM JIT runs show ~1.3–1.5× faster compilation overall (community build ~10%, examples: shapeless 1.26×, scalac ~1.35×), and SBT-integrated runs often cut developer compile time by ~30%. Two compiler optimizations highlighted are partial escape analysis and speculation-driven path duplication that remove allocations and replace expensive ops. Building a native-image of scalac yields huge cold-start wins (up to ~6×–13× faster for small tasks, comparable or slightly faster peak throughput than HotSpot), with limitations around dynamic class loading and reflective macros.
AI-written summary · about
chapters (14)
- 0:00Start
- 0:21Startup Time
- 1:09Native Image
- 3:34Partial Escape Analysis
- 4:54Simulate Simulation Based Paths of Duplication
- 6:14Cost-Benefit Analysis
- 9:53Performance of the Scala Compiler
- 15:19Problem of Startup in Managed Runtimes
- 30:52Shared Library
- 31:53Scala Native
- 32:45Jvm Libraries
- 33:02Benchmarking
- 33:44Summary
- 40:09Java 9 Runtime
related talks
41mRun Scala Faster with GraalVM on any Platform
23mAdopting GraalVM
29mGraalVM in a Nutshell
59mMaximizing performance with GraalVM
49mGraalVM: Run Programs Faster Anywhere
46mGraalVM Native Image — Faster, Smarter, Leaner
33mNew Opportunities for Developers with GraalVM
47mBring the action: using GraalVM in production
