Efficient Parallel Functional Programming with Effects
Efficient Parallel Functional Programming with Effects
复制标题
带效果的高效并行函数编程
DOI:
10.1145/3591284
复制
发表时间:
2023
影响因子:
--
通讯作者:
Acar, Umut A.
中科院分区:
文献类型:
--
作者:
Arora, Jatin;Westrick, Sam;Acar, Umut A.
Although functional programming languages simplify writing safe parallel programs by helping programmers to avoid data races, they have traditionally delivered poor performance. Recent work improved performance by using a hierarchical memory architecture that allows processors to allocate and reclaim memory independently without any synchronization, solving thus the key performance challenge afflicting functional programs. The approach, however, restricts mutation, or memory effects, so as to ensure "disentanglement", a low-level memory property that guarantees independence between different heaps in the hierarchy.This paper proposes techniques for supporting entanglement and for allowing functional programs to use mutation at will. Our techniques manage entanglement by distinguishing between disentangled and entangled objects and shielding disentangled objects from the cost of entanglement management. We present a semantics that formalizes entanglement as a property at the granularity of memory objects, and define several cost metrics to reason about and bound the time and space cost of entanglement. We present an implementation of the techniques by extending the MPL compiler for Parallel ML. The extended compiler supports all features of the Parallel ML language, including unrestricted effects. Our experiments using a variety of benchmarks show that MPL incurs a small time and space overhead compared to sequential runs, scales well, and is competitive with languages such as C++, Go, Java, OCaml. These results show that our techniques can marry the safety benefits of functional programming with performance.
登录
查看更多内容
DOI:
10.1145/301618.301648
发表时间:
1999-05
期刊:
Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
影响因子:
--
作者:
G. Blelloch;P. Cheng
通讯作者:
G. Blelloch;P. Cheng
DOI:
--
发表时间:
2016
期刊:
ACM SIGPLAN International Conference on Functional Programming
影响因子:
--
作者:
Umut A. Acar;A. Charguéraud;Mike Rainey;Filip Sieczkowski
通讯作者:
Filip Sieczkowski
DOI:
--
发表时间:
2017
期刊:
ACM-SIGACT Symposium on Principles of Programming Languages
影响因子:
--
作者:
Ananya Kumar;G. Blelloch;R. Harper
通讯作者:
R. Harper
DOI:
10.1145/3062341.3062370
发表时间:
2017
期刊:
Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation
影响因子:
--
作者:
Stefan K. Muller;Umut A. Acar;R. Harper
通讯作者:
R. Harper
DOI:
--
发表时间:
2020
期刊:
Proc. ACM Program. Lang.
影响因子:
--
作者:
K. Sivaramakrishnan;Stephen Dolan;Leo White;S. Jaffer;T. Kelly;Anmol Sahoo;S. Parimala;Atul Dhiman;Anil Madhavapeddy
通讯作者:
Anil Madhavapeddy