Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM Collections
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.7x) and equality checking (3–25.4x).
Fri 30 OctDisplayed time zone: Eastern Time (US & Canada) change
13:30 - 15:00 | 11. Programming Language DesignOOPSLA at Grand Station 1 Chair(s): Gary T. Leavens University of Central Florida | ||
13:30 22mTalk | Remote-Scope Promotion: Clarified, Rectified, and Verified OOPSLA John Wickerson Imperial College London, Mark Batty University of Cambridge, Bradford M. Beckmann Advanced Micro Devices, Inc, Alastair F. Donaldson Imperial College London DOI Media Attached | ||
13:52 22mTalk | Incremental Computation with Names OOPSLA Matthew Hammer University of Maryland, College Park, Jana Dunfield University of British Columbia, Canada, Kyle Headley University of Maryland, College Park, Nicholas Labich University of Maryland at College Park, USA, Jeffrey S. Foster University of Maryland at College Park, USA, Michael Hicks University of Maryland at College Park, USA, David Van Horn University of Maryland at College Park, USA DOI | ||
14:15 22mTalk | Checks and Balances: Constraint Solving without Surprises in Object-Constraint Programming Languages OOPSLA Tim Felgentreff HPI, Germany, Todd Millstein University of California at Los Angeles, USA, Alan Borning University of Washington, USA, Robert Hirschfeld HPI DOI | ||
14:37 22mTalk | Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM Collections OOPSLA Link to publication |