Automated Profile-Guided Replacement of Data Structures to Reduce Memory Allocation
Lukas Makor (JKU Linz, Austria), Sebastian Kloibhofer (JKU Linz,, Austria), Peter Hofer (Oracle Labs, Austria), David Leopoldseder (Oracle, Labs, Austria), Hanspeter M\"ossenb\"ock (JKU Linz, Austria)

TL;DR
This paper introduces an automated method integrated into GraalVM Native Image that profiles Java applications to replace data structures with more memory-efficient versions, reducing overall memory usage.
Contribution
It presents a novel automated profiling and replacement approach for data structures in Java, integrated into an AOT compiler, to optimize memory consumption.
Findings
Memory usage reduced by up to 13.85% in benchmarks
Average memory reduction of 1.63% in standard benchmarks
Average memory reduction of 2.94% in microservice benchmarks
Abstract
Data structures are a cornerstone of most modern programming languages. Whether they are provided via separate libraries, built into the language specification, or as part of the language's standard library -- data structures such as lists, maps, sets, or arrays provide programmers with a large repertoire of tools to deal with data. Moreover, each kind of data structure typically comes with a variety of implementations that focus on scalability, memory efficiency, performance, thread-safety, or similar aspects. Choosing the *right* data structure for a particular use case can be difficult or even impossible if the data structure is part of a framework over which the user has no control. It typically requires in-depth knowledge about the program and, in particular, about the usage of the data structure in question. However, it is usually not feasible for developers to obtain such…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
