Skip to Main content Skip to Navigation
Conference papers

Optimizing Hash-array Mapped Tries for Fast and Lean Immutable JVM Collections

Abstract : The data structures under-pinning collection API (e.g. lists, sets, maps) in the standard libraries of programming languages are used intensively in many applications. The standard libraries of recent Java Virtual Machine languages, such as Clojure or Scala, contain scalable and well-performing immutable collection data structures that are implemented as Hash-Array Mapped Tries (HAMTs). HAMTs already feature efficient lookup, insert, and delete operations, however due to their tree-based nature their memory footprints and the runtime performance of iteration and equality checking lag behind array-based counterparts. This particularly prohibits their application in programs which process larger data sets. In this paper, we propose changes to the HAMT design that increase the overall performance of immutable sets and maps. The resulting general purpose design increases cache locality and features a canonical representation. It outperforms Scala’s and Clojure’s data structure implementations in terms of memory footprint and runtime efficiency of iteration (1.3–6.7 x) and equality checking (3–25.4 x).
Document type :
Conference papers
Complete list of metadata

https://hal.inria.fr/hal-01261487
Contributor : Tijs van der Storm <>
Submitted on : Monday, January 25, 2016 - 2:06:56 PM
Last modification on : Tuesday, June 15, 2021 - 9:58:01 AM

Links full text

Identifiers

Collections

Citation

Michael Steindorfer, Jurgen Vinju. Optimizing Hash-array Mapped Tries for Fast and Lean Immutable JVM Collections. Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2015, New York, United States. pp.783--800, ⟨10.1145/2814270.2814312⟩. ⟨hal-01261487⟩

Share

Metrics

Record views

201