Christian Wimmer

Compiler-Assisted Object Inlining with Value Fields

Rodrigo Bruno, Vojin Jovanovic, Christian Wimmer, Gustavo Alonso: Compiler-Assisted Object Inlining with Value Fields. In Proceedings of the International Conference on Programming Language Design and Implementation, pages 128–141. ACM Press, 2021. doi:10.1145/3453483.3454034

Abstract

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 data fragmentation, resulting in high memory footprint and poor locality.

To improve memory footprint and memory locality, embedding the payload of an object into another (object inlining) has been proposed, however, with severe limitations. We argue that object inlining is mostly useful to optimize objects in the application data-path and that such objects have value semantics, unlocking great potential for inlining objects.

We propose value fields, an abstraction which allows fields to be marked as having value semantics. We take advantage of the closed-world assumption provided by GraalVM Native Image to implement Object inlining. Results show that using value fields requires minimal to no effort from developers and leads to improvements in throughput of up to 3x, memory footprint of up to 40%, and GC pause times of up to 35%.