Skip to main content
Kent Academic Repository

Optimizing layout of recursive datatypes with Marmoset

Singhal, Vidush, Koparkar, Chaitanya, Zullo, Joseph, Pelenitsyn, Artem, Vollmer, Michael, Rainey, Mike, Newton, Ryan R., Kulkarni, Milind (2024) Optimizing layout of recursive datatypes with Marmoset. In: 38th European Conference on Object-Oriented Programming (ECOOP 2024). . Schloss Dagstuhl - Leibniz-Zentrum f\"r Informatik (doi:10.4230/LIPIcs.ECOOP.2024.38) (KAR id:106460)

Abstract

While programmers know that the low-level memory representation of data structures can have significant effects on performance, compiler support to optimize the layout of those structures is an under-explored field. Prior work has optimized the layout of individual, non-recursive structures without considering how collections of those objects in linked or recursive data structures are laid out. This work introduces Marmoset, a compiler that optimizes the layouts of algebraic datatypes, with a special focus on producing highly optimized, packed data layouts where recursive structures can be traversed with minimal pointer chasing. Marmoset performs an analysis of how a recursive ADT is used across functions to choose a global layout that promotes simple, strided access for that ADT in memory. It does so by building and solving a constraint system to minimize an abstract cost model, yielding a predicted efficient layout for the ADT. Marmoset then builds on top of Gibbon, a prior compiler for packed, mostly-serial representations, to synthesize optimized ADTs. We show experimentally that Marmoset is able to choose optimal layouts across a series of microbenchmarks and case studies, outperforming both Gibbons baseline approach, as well as MLton, a Standard ML compiler that uses traditional pointer-heavy representations.

Item Type: Conference or workshop item (Paper)
DOI/Identification number: 10.4230/LIPIcs.ECOOP.2024.38
Projects: 17715
Uncontrolled keywords: tree traversals; compilers; data layout optimization; dense data layout
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Institutional Unit: Schools > School of Computing
Former Institutional Unit:
Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Funders: Engineering and Physical Sciences Research Council (https://ror.org/0439y7842)
Depositing User: Michael Vollmer
Date Deposited: 01 Jul 2024 10:16 UTC
Last Modified: 11 Sep 2025 03:07 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/106460 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views of this page since July 2020. For more details click on the image.