Chapter 7

Runtime Performance Optimizations: A Focus on Strings, Locks, and Beyond


Efficiency in runtime performance is crucial for scaling applications and meeting user demands. At the heart of this is the JVM, managing runtime facets such as just-in-time (JIT) compilation, garbage collection, and thread synchronization—each profoundly influencing Java applications’ performance.

Java’s evolution from Java 8 to Java 17 showcases a commitment to performance optimization, evident in more than 350 JDK Enhancement Proposals (JEPs). Noteworthy are optimizations like the reduced footprint of java.lang.String, advancements in contended locking mechanisms, and the indy-fication of string concatenation,1 all significantly contributing to ...

Get JVM Performance Engineering: Inside OpenJDK and the HotSpot Java Virtual Machine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.