Automated Profile-Guided Replacement of Data Structures to Reduce Memory Allocation

Lukas Makor*, Sebastian Kloibhofer*, Peter Hofer*, David Leopoldseder*, Hanspeter Mössenböck*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Data structures are essential tools in programming languages, offering various implementations optimized for factors like performance and memory efficiency. Selecting the optimal data structure is often difficult, especially within frameworks beyond the developer’s control. This paper presents an automated approach to optimizing data structures in Java applications. Using profiling, we collect allocation-site-specific usage metrics and replace standard data structures with customized, memory-efficient versions. Integrated into GraalVM Native Image, our approach reduces memory usage by up to 13.85 % in data structure–intensive benchmarks, with average reductions of 1.63 % in standard and 2.94 % in microservice-based benchmarks. While not beneficial for all workloads, our results demonstrate that automated profiling and replacement can improve memory efficiency and lay the groundwork for further optimizations.
Original languageEnglish
Article number3
Number of pages43
JournalArt, Science, and Engineering of Programming
Volume10
Issue number1
DOIs
Publication statusPublished - 15 Feb 2025

Fields of science

  • 102009 Computer simulation
  • 102013 Human-computer interaction
  • 102011 Formal languages
  • 102022 Software development
  • 102029 Practical computer science
  • 102 Computer Sciences
  • 102024 Usability research

JKU Focus areas

  • Digital Transformation

Cite this