@gron

First-class Runtime Generation of High-performance Types Using Exotypes

, , , , and . Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 77--88. ACM, (2014)
DOI: 10.1145/2594291.2594307

Abstract

We introduce exotypes, user-defined types that combine the flexibility of meta-object protocols in dynamically-typed languages with the performance control of low-level languages. Like objects in dynamic languages, exotypes are defined programmatically at run-time, allowing behavior based on external data such as a database schema. To achieve high performance, we use staged programming to define the behavior of an exotype during a runtime compilation step and implement exotypes in Terra, a low-level staged programming language. We show how exotype constructors compose, and use exotypes to implement high-performance libraries for serialization, dynamic assembly, automatic differentiation, and probabilistic programming. Each exotype achieves expressiveness similar to libraries written in dynamically-typed languages but implements optimizations that exceed the performance of existing libraries written in low-level statically-typed languages. Though each implementation is significantly shorter, our serialization library is 11 times faster than Kryo, and our dynamic assembler is 3--20 times faster than Google's Chrome assembler.

Description

First-class runtime generation of high-performance types using exotypes

Links and resources

Tags

community

  • @gron
  • @dblp
@gron's tags highlighted