Type stability in Julia: avoiding performance pathologies in JIT compilation
Artem Pelenitsyn, Julia Belyakova, Benjamin Chung, Ross Tate, Jan Vitek
Abstract
As a scientific programming language, Julia strives for performance but also provides high-level productivity features. To avoid performance pathologies, Julia users are expected to adhere to a coding discipline that enables so-called type stability. Informally, a function is type stable if the type of the output depends only on the types of the inputs, not their values. This paper provides a formal definition of type stability as well as a stronger property of type groundedness, shows that groundedness enables compiler optimizations, and proves the compiler correct. We also perform a corpus analysis to uncover how these type-related properties manifest in practice.
CCS Concepts: • Software and its engineering → Just-in-time compilers; Semantics.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext b00095ff-584b-4924-8045-471ed7cbdeb6Cited by top-tier papers1
Ask how each one uses itBuilds on3
- Formally verified speculation and deoptimization in a JIT compilerAurèle Barrière, Sandrine Blazy, Olivier Flückiger, David Pichardie et al.POPL 2021 · 38 citations
- Contextual dispatch for function specializationOlivier Flückiger, Guido Chari, Ming-Ho Yee, Jan Jecmen et al.OOPSLA 2020 · 31 citations
- World age in Julia: optimizing method dispatch in the presence of evalJulia Belyakova, Benjamin Chung, Jack Gelinas, Jameson Nash et al.OOPSLA 2020 · 9 citations
Related papers
- Type-Preserving Flat Closure OptimizationAdam T. Geller, Sean Bocirnea, Chester J. F. Gould, Paulette Koronkevich et al.OOPSLA 2025
- How statically-typed functional programmers write codeJustin Lubin, Sarah E. ChasinsOOPSLA 2021 · 17 citations
- Well-typed programs can go wrong: a study of typing-related bugs in JVM compilersStefanos Chaliasos, Thodoris Sotiropoulos, Georgios-Petros Drosos, Charalambos Mitropoulos et al.OOPSLA 2021 · 31 citations
- Leveraging Rust Types for Program SynthesisJonás Fiala, Shachar Itzhaky, Peter Müller, Nadia Polikarpova et al.PLDI 2023 · 17 citations
- Knowing when to ask: sound scheduling of name resolution in type checkers derived from declarative specificationsArjen Rouvoet, Hendrik van Antwerpen, Casper Bach Poulsen, Robbert Krebbers et al.OOPSLA 2020 · 9 citations
