Recent work showed that compiling functional programs to use dense, serialized memory representations for recursive algebraic datatypes can yield significant constant-factor speedups for sequential programs. But serializing data in a maximally dense format consequently serializes the processing of that data, yielding a tension between density and parallelism. This paper shows that a disciplined, practical compromise is possible. We present Parallel Gibbon, a compiler that obtains the benefits of dense data formats and parallelism. We formalize the semantics of the parallel location calculus underpinning this novel implementation strategy, and show that it is type-safe. Parallel Gibbon exceeds the parallel performance of existing compilers for purely functional programs that use recursive algebraic datatypes, including, notably, abstract-syntax-tree traversals as in compilers.
翻译:最近的工作表明,为循环代数数据类型使用密集、序列的内存表达式而汇编功能程序,可以为连续程序生成显著的恒定要素加速。但以最大密度格式进行数据序列化,从而导致数据的处理序列化,在密度和平行性之间产生紧张关系。本文显示,有条不紊、实际的折中是可能的。我们提出了平行的Gibbon,这是一位获得密集数据格式和平行性的好处的编译者。我们正式确定了支持这项新颖执行战略的平行位置微积分的语义,并表明它是安全的。平行的Gibbon超过了使用循环代数数据类型的纯功能性程序的现有编译者的平行性能,其中主要包括编译者中的抽象-合成-树木曲。