Compiler-Assisted Object Inlining with Value Fields
- 1. Oracle Labs, Switzerland
- 2. Oracle Labs, USA
- 3. Systems Group, Dept. of Computer Science, ETH Zurich
Description
Object Oriented Programming has flourished in many areas ranging from web-oriented microservices, data processing, to databases. However, while representing domain entities as objects is appealing to developers, it leads to high data fragmentation as data is loaded into applications as large collections of data objects, resulting in high memory footprint and poor locality.
To minimize memory footprint and increase memory locality, embedding the payload of an object into another object (object inlining) has been considered before but existing techniques present severe limitations that prevent it from becoming a widely adopted technique. We argue that object inlining is mostly useful to optimize the application data-path and that objects in the data-path have value semantics, which unlocks great potential for inlining objects. We therefore propose value fields, an abstraction which allows fields to be marked as having value semantics.
We implement value fields for GraalVM Native Image. Object inlining is implemented as a compiler pipeline phase that mutates both object layouts and application code to access inlined fields. Experimental evaluation shows that applying value fields in real-world frameworks such as Apache Spark, Spring Boot, and Micronaut, requires minimal or even no effort at all from developers. Results show improvements in throughput of up to 3×, memory footprint reduction of up to 40% and reduced GC pause times of up to 35%.
Files
PLDI-AE-44.zip
Files
(9.4 GB)
Name | Size | Download all |
---|---|---|
md5:094c07aac7097f0895c1b7a22e2a2378
|
9.4 GB | Preview Download |
md5:44ff63b079c457ac2bdcfe8d62648da4
|
7.6 kB | Preview Download |