The design and implementation of the wolfram language compiler

Abdul Dakkak, Tom Wickham-Jones, Wen Mei Hwu

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

The popularity of data- and scientific-oriented applications, abundance of on-demand compute resources, and scarcity of domain expert programmers have given rise to high-level scripting languages. These high-level scripting languages offer a fast way to translate ideas into code, but tend to incur a heavy performance overhead. In order to alleviate the performance penalty, each implementation of these languages often offers a compilation path to a subset of the language. In this paper we present the design and implementation of theWolfram Language compiler, the production compiler for the Wolfram Language. We show how popular language features and runtime behavior, expected by Wolfram Language developers, are efficiently implemented within the compiler. We then show how the compiler provides a friction-less path to migrate programs from the interpreter to the compiler.We evaluate the compiler and show that compiled code matches the performance of highly tuned hand-written C code. The compiler has been released as a prominent feature of Wolfram Engine v12 and is readily available to developers.

Original languageEnglish (US)
Title of host publicationCGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization
EditorsJason Mars, Lingjia Tang, Jingling Xue, Peng Wu
PublisherAssociation for Computing Machinery, Inc
Pages212-228
Number of pages17
ISBN (Electronic)9781450370479
DOIs
StatePublished - Feb 22 2020
Event18th ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2020 - San Diego, United States
Duration: Feb 22 2020Feb 26 2020

Publication series

NameCGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization

Conference

Conference18th ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2020
CountryUnited States
CitySan Diego
Period2/22/202/26/20

Keywords

  • Mathematica
  • Type Inference
  • Wolfram Compiler

ASJC Scopus subject areas

  • Applied Mathematics
  • Computer Science Applications
  • Control and Optimization
  • Computational Theory and Mathematics

Fingerprint Dive into the research topics of 'The design and implementation of the wolfram language compiler'. Together they form a unique fingerprint.

  • Cite this

    Dakkak, A., Wickham-Jones, T., & Hwu, W. M. (2020). The design and implementation of the wolfram language compiler. In J. Mars, L. Tang, J. Xue, & P. Wu (Eds.), CGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization (pp. 212-228). (CGO 2020 - Proceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization). Association for Computing Machinery, Inc. https://doi.org/10.1145/3368826.3377913