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
%0 Conference Paper
%1 DeVito:2014:FRG
%A DeVito, Zachary
%A Ritchie, Daniel
%A Fisher, Matt
%A Aiken, Alex
%A Hanrahan, Pat
%B Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
%D 2014
%I ACM
%K Assembler Lua MOP MetaProgramming Performance Serialization Terra V8
%P 77--88
%R 10.1145/2594291.2594307
%T First-class Runtime Generation of High-performance Types Using Exotypes
%X 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.
%@ 978-1-4503-2784-8
@inproceedings{DeVito:2014:FRG,
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.},
acmid = {2594307},
added-at = {2014-08-10T12:00:40.000+0200},
author = {DeVito, Zachary and Ritchie, Daniel and Fisher, Matt and Aiken, Alex and Hanrahan, Pat},
biburl = {https://www.bibsonomy.org/bibtex/2e8d1d9bf0fc2a7fcd680e0fe58f41b2c/gron},
booktitle = {Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation},
description = {First-class runtime generation of high-performance types using exotypes},
doi = {10.1145/2594291.2594307},
interhash = {37ac5cfe758065e0f44b677a2469508d},
intrahash = {e8d1d9bf0fc2a7fcd680e0fe58f41b2c},
isbn = {978-1-4503-2784-8},
keywords = {Assembler Lua MOP MetaProgramming Performance Serialization Terra V8},
location = {Edinburgh, United Kingdom},
numpages = {12},
pages = {77--88},
publisher = {ACM},
series = {PLDI '14},
timestamp = {2014-08-10T12:00:40.000+0200},
title = {First-class Runtime Generation of High-performance Types Using Exotypes},
year = 2014
}