Project Lilliput: why Java objects are getting smaller
Se você programa em Java, provavelmente já escreveu algo assim milhares de vezes: var user = new User (); Parece simples: criamos um objeto e ele ocupa na memória apenas o espaço necessário para guardar seus dados. Mas não é bem assim. Todo objeto tem uma pequena "mochila" Além dos dados que você colocou nele, cada objeto Java carrega algumas informações extras usadas internamente pela JVM. É o…
The OpenJDK's Project Lilliput aims to reduce the size of internal JVM structures, specifically the Object Header, which currently occupies 12 or 16 bytes in a 64-bit HotSpot JVM. By compacting this header to 8 bytes, the project could lead to significant memory savings, particularly for applications with millions of objects. According to tests, this change could result in up to 22% less heap usage, 8% less CPU usage, and 15% fewer Garbage Collection cycles.
The optimization is done within the JVM, requiring no changes to developers' code, and is expected to be implemented in future Java versions, having already appeared as an experimental feature in Java 24 and becoming an official feature in Java 25, although still disabled by default.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.