Vollmer, Michael, Spall, Sarah, Chamith, Buddhika, Sakka, Laith, Koparkar, Chaitanya, Kulkarni, Milind, Tobin-Hochstadt, Sam, Newton, Ryan R. (2017) Compiling Tree Transforms to Operate on Packed Representations. In: 31st European Conference on Object-Oriented Programming (ECOOP 2017). Leibniz International Proceedings in Informatics (LIPIcs) , 74. 26:1-26:29. Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany ISBN 978-3-95977-035-4. (doi:10.4230/LIPIcs.ECOOP.2017.26) (KAR id:98980)
PDF
Publisher pdf
Language: English
This work is licensed under a Creative Commons Attribution 4.0 International License.
|
|
Download this file (PDF/804kB) |
Preview |
Request a format suitable for use with assistive technology e.g. a screenreader | |
Official URL: http://drops.dagstuhl.de/opus/volltexte/2017/7273 |
Abstract
When written idiomatically in most programming languages, programs
that traverse and construct trees operate over pointer-based data
structures, using one heap object per-leaf and per-node. This
representation is efficient for random access and shape-changing
modifications, but for traversals, such as compiler passes, that
process most or all of a tree in bulk, it can be inefficient. In this
work we instead compile tree traversals to operate on
pointer-free pre-order serializations of trees. On modern
architectures such programs often run significantly faster than
their pointer-based counterparts, and additionally are directly suited
to storage and transmission without requiring marshaling.
We present a prototype compiler, Gibbon, that compiles a
small first-order, purely functional language sufficient for tree
traversals. The compiler transforms this language into intermediate
representation with explicit pointers into input and output buffers
for packed data. The key compiler technologies include an effect
system for capturing traversal behavior, combined with an algorithm to
insert destination cursors. We evaluate our compiler on tree
transformations over a real-world dataset of source-code syntax trees.
For traversals touching the whole tree, such as maps and folds, packed
data allows speedups of over 2x compared to a highly-optimized
pointer-based baseline.
Item Type: | Conference or workshop item (Paper) |
---|---|
DOI/Identification number: | 10.4230/LIPIcs.ECOOP.2017.26 |
Subjects: | Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming, |
Divisions: | Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing |
Depositing User: | Michael Vollmer |
Date Deposited: | 07 Dec 2022 21:28 UTC |
Last Modified: | 08 Dec 2022 16:44 UTC |
Resource URI: | https://kar.kent.ac.uk/id/eprint/98980 (The current URI for this page, for reference purposes) |
- Link to SensusAccess
- Export to:
- RefWorks
- EPrints3 XML
- BibTeX
- CSV
- Depositors only (login required):