Approximating Type Stability in the Julia JIT
summary
Presents a first algorithm to approximate type stability for Julia by enumerating concrete subtypes of a method signature and running Julia’s own type inference per (method, concrete input) to predict return concreteness. Introduces a Direct subtypes strategy plus a sampling-based approximation (collecting concrete instantiations from test suites) to avoid infinite enumeration. Prototype implementation is work in progress; preliminary evaluation on 10 popular packages matches dynamic tracing closely, suggesting the approach predicts type-stable methods without diving into SSA IR.
AI-written summary · about
chapters (10)
- 0:00Type stability in Julia
- 1:05Mixed type operations performance
- 3:17Multiple dispatch and de-virtualization
- 5:46Limitations of type stability tools
- 7:32Source-level analysis framework
- 10:00Unions and existential types
- 12:07Unbounded parametric types challenges
- 13:55Input types via sampling
- 15:23Evaluation and results
- 16:47Q&A
related talks
13mType Stability in Julia: Avoiding Performance Pathologies in JIT Compilation
27mTowards Type Debugging using Partial Evaluation
21mPolymorphic Type Inference for Dynamic Languages
15mTaming Type Annotations in Gradual Typing
25mIncremental Type-Checking for Free: Using Scope Graphs to Derive Incremental Type-Checkers
14mSeeking Stability by being Lazy and Shallow: Lazy and shallow instantiation
17mFrom Traces to Program Incorrectness: A Type-Theoretic Approach
26mType Narrowing the Hard Way
