Java compact object headers

Content:

Original link: JEP 534: Compact Object Headers by Default / LinkedIn.

Let us first get the history clear: compact object headers was added as an experiemental feature in Java 24 (March 2025), became a production ready feature in Java 25 (September 2025) and will become default enabled in Java 27 (September 2026).

Sometimes it is difficult to say what changes are important.

Compact object headers does not enable the Java developer to do anything new. But it does reduce overhead of objects from 12 to 8 bytes - and all Java programs has objects many of them a lot, so all Java programs will benefit from this change in the form of less memory usage.

Comments: