An Optimizing Compiler for a Purely Functional Web-Application Language
Name
UrWebICFP15.pdf
Description
Accepted version
Size
355.27 KB
Format
Adobe PDF
Checksum (MD5)
0d3819e4b035ac9bb9c368859d9e1e38
Author(s)
Chlipala, Adam
Date Issued
August 2015
Publisher
Association for Computing Machinery (ACM)
Citation
Chlipala, Adam. 2015. "An Optimizing Compiler for a Purely Functional Web-Application Language."
Version
Author's final manuscript
Abstract
High-level scripting languages have become tremendously popular for development of dynamic Web applications. Many programmers appreciate the productivity benefits of automatic storage management, freedom from verbose type annotations, and so on. While it is often possible to improve performance substantially by rewriting an application in C or a similar language, very few programmers bother to do so, because of the consequences for human development effort. This paper describes a compiler that makes it possible to have most of the best of both worlds, coding Web applications in a high-level language but compiling to native code with performance comparable to handwritten C code. The source language is Ur/Web, a domain-specific, purely functional, statically typed language for the Web. Through a coordinated suite of relatively straightforward program analyses and algebraic optimizations, we transform Ur/Web programs into almost-idiomatic C code, with no garbage collection, little unnecessary memory allocation for intermediate values, etc. Our compiler is in production use for commercial Web sites supporting thousands of users, and microbenchmarks demonstrate very competitive performance versus mainstream tools.
MIT Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory
Terms of Use
Creative Commons Attribution-Noncommercial-Share Alike
Persistent DSpace Link
DOI of Published Version
https://doi.org/10.1145/2784731.2784741