Type Stability in Julia: Avoiding Performance Pathologies in JIT Compilation
summary
Formalizes type stability and introduces a stronger property, type groundedness, proves grounded instances always fully devirtualize under a modeled JIT, and gives conditions on the type inference that the proofs require. Builds an SSA-like formal IR and a JIT model called Jules and validates claims with a dynamic corpus analysis over 1000 packages, finding most methods small and grounded and showing groundedness predicts when devirtualization and unboxing actually occur.
AI-written summary · about
chapters (9)
- 0:00Performance pathology
- 2:14Performance engineering
- 5:46Jules - a model of Julia's JIT julia
- 6:47JIT: Method specialization for concrete types Program
- 7:26JIT: Devirtualization
- 8:30Type groundedness: all slots are concrete
- 9:10Type instability: return type is abstract
- 10:24Recap: type stability vs groundedness
- 12:03Takeaways
related talks
17mApproximating Type Stability in the Julia JIT
25mThe Unreasonable Performance Of The Julia Language
14mSeeking Stability by being Lazy and Shallow: Lazy and shallow instantiation
26mJulia: Practical Restrictions For A Scientific-Computing Language
22mJulia - Dynamism and Performance Reconciled by Design
23mFormally Verified Speculation and Deoptimization in a JIT Compiler
14mCoSSJIT: Combining Static Analysis and Speculation in JIT Compilers
27mTowards Type Debugging using Partial Evaluation
