1
views
0
recommends
+1 Recommend
0 collections
    0
    shares
      • Record: found
      • Abstract: found
      • Article: found
      Is Open Access

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

      Preprint

      Read this article at

      Bookmark
          There is no author summary for this article yet. Authors can add summaries to their articles on ScienceOpen to make them more accessible to a non-specialist audience.

          Abstract

          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-7% of packages bypass world age. This suggests that Julia's semantics aligns with programmer expectations.

          Related collections

          Author and article information

          Journal
          15 October 2020
          Article
          2010.07516
          0103d6e3-2dcc-4034-8b58-d061fa537b4f

          http://arxiv.org/licenses/nonexclusive-distrib/1.0/

          History
          Custom metadata
          OOPSLA 2020, extended version with proofs in appendix
          cs.PL

          Programming languages
          Programming languages

          Comments

          Comment on this article