5 Things You Need To Know About Scala Compilation
summary
Build time often exceeds raw compilation because SBT does dependency resolution, runs source generators and formatters, and evaluates task graphs before invoking Zinc, so use the IDE for tight edit/compile cycles. Zinc installs extra phases and zinc adds ~15% cold-compile overhead. Macro-heavy code explodes AST size and bytecode: each derived typeclass can add ~23KB and the typical tpnf ≈ 1.2 jumps above 4 for pathological cases. Whitebox macros are typechecked 3x. Expect ~1,200 LOC/s for normal Scala and ~400 LOC/s for heavy FP; Java ≈10,000 LOC/s.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker intro
- 1:50Build time vs compilation time
- 8:59Zinc and incremental compilation
- 10:03Type class derivation pitfalls
- 17:08White box macros type checked thrice
- 19:36Type checking overhead and debugging
- 28:26Scala compiler single-threaded nature
- 31:40Scala compilation speed benchmarks
- 34:05Quiz time and Q&A








