Using field access frequency to optimize layout of objects in the JVM
Taees Eimouri, Kenneth B. Kent, Aleksandar D. Micić, Karl Taylor · 2016
Increasing data locality is a good way to alleviate the gap between memory latency and processor speed. Structure layout optimization is one way to improve spatial locality and consequently improve runtime performance by rearranging fields inside objects. This paper examines modifying IBM's JVM with the ability to reorder fields inside Java objects from access frequency information (hotness) in the presence of storage optimization. In order to decrease the overhead resulting from larger objects, the new layouts for Java objects are very similar to their default layouts in terms of size. The results are promising and we were able to reduce cache misses by as much as 12%, resulting in about 20% in performance improvement.