DeepAI AI Chat
Log In Sign Up

World Age in Julia: Optimizing Method Dispatch in the Presence of Eval (Extended Version)

10/15/2020
by   Julia Belyakova, et al.
0

Dynamic programming languages face semantic and performance challenges in the presence of features, such as eval, that can inject new code into a running program. The Julia programming language introduces the novel concept of world age to insulate optimized code from one of the most disruptive side-effects of eval: changes to the definition of an existing function. This paper provides the first formal semantics of world age in a core calculus named Juliette, and shows how world age enables compiler optimizations, such as inlining, in the presence of eval. While Julia also provides programmers with the means to bypass world age, we found that this mechanism is not used extensively: a static analysis of over 4,000 registered Julia packages shows that only 4-9 packages bypass world age. This suggests that Julia's semantics aligns with programmer expectations.

READ FULL TEXT

page 1

page 2

page 3

page 4

07/15/2021

A Functional Programming Language with Versions

While modern software development heavily uses versioned packages, progr...
09/04/2021

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

As a scientific programming language, Julia strives for performance but ...
11/20/2020

A Comparison of Big-step Semantics Definition Styles

Formal semantics provides rigorous, mathematically precise definitions o...
05/12/2018

π: Towards a Simple Formal Semantic Framework for Compiler Construction

This paper proposes π, a formal semantic framework for compiler construc...
06/02/2022

A Constraint and Object Oriented Fifth Generation Programming Language and its Compiler and Runtime System

Since the advent of LISP, the fifth generation programming language has ...
07/25/2019

Explicit and Controllable Assignment Semantics

Despite the plethora of powerful software to spot bugs, identify perform...
09/18/2022

A Type-Directed, Dictionary-Passing Translation of Featherweight Generic Go

Featherweight Generic Go (FGG) is a minimal core calculus modeling the e...