Lune

OOPSLA2021Top-tier venue

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Decidable Subtyping of Existential Types for JuliaJulia Belyakova, Benjamin Chung, Ross Tate, Jan VitekPLDI 2024 · 2 citations

Builds on3

  1. 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
  2. Contextual dispatch for function specializationOlivier Flückiger, Guido Chari, Ming-Ho Yee, Jan Jecmen et al.OOPSLA 2020 · 31 citations
  3. 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

  1. How statically-typed functional programmers write codeJustin Lubin, Sarah E. ChasinsOOPSLA 2021 · 17 citations
  2. 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
  3. Defunctionalization with Dependent TypesYulong Huang, Jeremy YallopPLDI 2023 · 4 citations
  4. Type-Preserving Flat Closure OptimizationAdam T. Geller, Sean Bocirnea, Chester J. F. Gould, Paulette Koronkevich et al.OOPSLA 2025
  5. 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
Dusk over the sea between two cliffs drawn in fine vertical lines