Type stability in Julia: a simple and efficient optimization technique

Artem Pelenitsyn · 2023

The design space for just-in-time (JIT) compilers is big, and Julia representsone viewpoint. The outstanding features of this viewpoint is simplicity and efficiency, which are enabled by a clever co-design of the language and its implementation. The combination of simplicity and efficiency also allows users to employ language strengths and avoid common pitfalls that threaten the wide family of JIT compilers. My work has been focused on type stability in Julia---a program property enablingkey optimizations in the compiler. Informally, a function is type stable if the type of the output depends only on the types of the inputs, not their values. In this dissertation, I make the following contributions related to type stability. First, an analysis of how widespread the property is in publicly available Julia code, and what features may be related to the property. Second, a formal model of a JIT compiler recognizing the property at run time and performing optimizations accordingly. Third, an automated approach to approximate type stability without running the program. --Author's abstract

Read the paper · More papers on PaperTik