Repository logo
 

Prefetching in functional languages

Accepted version
Peer-reviewed

Loading...
Thumbnail Image

Type

Conference Object

Change log

Authors

Abstract

Functional programming languages contain a number of runtime and language features, such as garbage collection, indirect memory accesses, linked data structures and immutability, that interact with a processor’s memory system. These conspire to cause a variety of unintuitive memory performance effects. For example, it is slower to traverse through linked lists and arrays of data that have been sorted than to traverse the same data accessed in the order it was allocated. We seek to understand these issues and mitigate them in a manner consistent with functional languages, taking advantage of the features themselves where possible. For example, immutability and garbage collection force linked lists to be allocated roughly sequentially in memory, even when the data pointed to within each node is not. We add language primitives for software-prefetching to the OCaml language to exploit this, and observe significant performance improvements a variety of micro- and macro-benchmarks, resulting in speedups of up to 2× on the out-of-order superscalar Intel Haswell and Xeon Phi Knights Landing systems, and up to 3× on the in-order Arm Cortex-A53.

Description

Keywords

46 Information and Computing Sciences, 4612 Software Engineering

Journal Title

Proceedings of the 2020 ACM SIGPLAN International Symposium on Memory Management

Conference Name

ISMM '20: 2020 ACM SIGPLAN International Symposium on Memory Management

Journal ISSN

Volume Title

Publisher

ACM

Rights

All rights reserved
Sponsorship
Engineering and Physical Sciences Research Council (EP/K026399/1)
Engineering and Physical Sciences Research Council (EP/M506485/1)
Engineering and Physical Sciences Research Council (EP/P020011/1)
EPSRC (1510365)
Arm Limited
Relationships
Is supplemented by: