...
首页> 外文期刊>LIPIcs : Leibniz International Proceedings in Informatics >Compiling Tree Transforms to Operate on Packed Representations
【24h】

Compiling Tree Transforms to Operate on Packed Representations

机译:编译树变换以对压缩表示进行操作

获取原文
   

获取外文期刊封面封底 >>

       

摘要

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.
机译:用大多数编程语言惯用的语言编写时,遍历和构造树的程序在基于指针的数据结构上运行,每个叶和每个节点使用一个堆对象。这种表示形式对于随机访问和形状更改修改是有效的,但是对于遍历处理大部分或全部树的遍历(例如编译器遍历)而言,效率可能很低。在这项工作中,我们改为编译树遍历以对树的无指针预序列化进行操作。在现代体系结构上,此类程序的运行速度通常比其基于指针的同类程序快得多,并且此外,它们还直接适合于存储和传输,而无需封送处理。我们提供了一个原型编译器Gibbon,它编译了一种小的一阶纯函数语言,足以进行树遍历。编译器将此语言转换为中间表示形式,并使用显式指针将其打包为打包数据的输入和输出缓冲区。关键的编译器技术包括一个用于捕获遍历行为的效果系统,并结合了用于插入目标光标的算法。我们在真实世界中的源代码语法树数据集上的树变换上评估编译器。对于遍历整棵树的遍历(例如地图和折页),与高度优化的基于指针的基线相比,打包的数据可使速度提高2倍以上。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号