English

Type Stability in Julia: Avoiding Performance Pathologies in JIT Compilation (Extended Version)

Programming Languages 2021-11-18 v2

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.

Keywords

Cite

@article{arxiv.2109.01950,
  title  = {Type Stability in Julia: Avoiding Performance Pathologies in JIT Compilation (Extended Version)},
  author = {Artem Pelenitsyn and Julia Belyakova and Benjamin Chung and Ross Tate and Jan Vitek},
  journal= {arXiv preprint arXiv:2109.01950},
  year   = {2021}
}

Comments

OOPSLA '21, extended version

R2 v1 2026-06-24T05:41:12.291Z