Should I Upgrade My Java
summary
JMH microbenchmarks run on a 4‑core i5 with 3 forks, 5 warm, 5 measurement show JDK 17 consistently delivers higher throughput than 8 and slightly beats 11 overall, with small hysteresis where 11 briefly outperforms 17 on short String workloads; numbers are in operations/sec and code sits on GitHub. Memory tests (Runtime total−free) show JDK 17 uses slightly less memory—about ~70KB at 1M entries—and practical features (records, pattern matching, sealed classes, helpful NPEs) reduce boilerplate and runtime debugging.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:26Performance benchmarks setup
- 5:00Map operations performance data
- 7:29Memory usage comparison
- 12:31Key Java features overview
- 13:36Local variable type inference
- 15:23Enhanced switch statements
- 20:00Text blocks for strings
- 22:25Helpful null pointer exceptions
- 25:58Pattern matching introduction
- 28:07Records for data modeling
- 31:39Sealed classes explained
- 37:00Removed and deprecated features
- 38:28Upgrade recommendations
related talks
01h 01mShould I Upgrade to Java 17?
53mShould I Upgrade my Java?
46mGoing Java::Current in Production
51mJava Performance Update: From JDK 21 to JDK 25
46mBeam Me Up, Java! A Journey through Java LTS Versions 11 to 21
47mBeam Me Up, Java! Unraveling the Warp-Speed Evolution: A Journey through Java
48mA journey to JVM Excellence: Navigating JDKs and JVMs
01h 02mWhy Java (like a good wine) becomes better with age even if you don’t use the latest features
