HackerPapers

arXiv:2109.01950cs.PL

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

Artem Pelenitsyn, Julia Belyakova, Benjamin Chung, Ross Tate, Jan Vitek

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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.

arXiv comments
OOPSLA '21, extended version
Journal reference
DOI
doi:10.1145/3485527
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 2 threads, from Dec 2021 to Apr 2022. Found in 1 HN submission from Dec 2021 to Dec 2021. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Or more directly, the property of type groundedness + multiple dispatch allows for devirtualization of dispatches to get static-like performance in a dynamic language. That was the main design principle, which was a conjecture from Jeff's thesis later proven in a type-theoretic…

      ChrisRackauckasView on HNParent context

    • That is not a very charitable characterization of the position of multiple dispatch in Julia. It's not something that's optional: multiple dispatch is essential for the performance that Julia is looking to achieve. If you notice where acceleration DSLs tend to have trouble…

      ChrisRackauckasView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.