Secrets of top performance in Java revealed
summary
Comparative benchmarks parse the Bible text (4.3 MB, ~825k words, ~84.5k lines) with four Java implementations (Java 2 style, Java 7 IO/scanner, Java 8 streams, Java 8 parallel streams) and a C++ version, built with Gradle and available on GitHub; results show cold runs favor C++, but after C1/C2 JIT warmup Java 8 (with C2) matches or beats Java 7 and approaches Java 2, parallel streams become fastest only after heavy optimization, scanner/regex costs dominate some slow paths, and Graal native-image and SubstrateVM give different tradeoffs.
AI-written summary · about
chapters (24)
- 0:00Introduction
- 4:00Competitions
- 4:45Top performance
- 7:25Java performance
- 8:50Real life example
- 9:10Frequency
- 9:35Word Count
- 11:30Interface
- 12:35Implementation
- 15:30Performance statistics
- 20:25Nonblocking IO
- 22:35Scanner
- 23:15Optimization
- 24:30Java 8 implementation
- 26:50Java 8 optimization
- 28:50Parallel source
- 30:30Results
- 32:10What about C
- 38:05Native Image Tool
- 39:35Stopwatch
- 40:30Questions
- 43:45Concurrency
- 44:30Parallel streams
- 45:50C implementation
related talks
57mMaximizing the Performance of Java 8 Streams
01h 00mLet’s Get to the Rapids: Java 8 Stream Performance
48mA journey to JVM Excellence: Navigating JDKs and JVMs
48mJava 9 Performance
47mWhen Greed Is Good: Understanding Java Stream Performance
51mJava at Speed: Getting the Most Out of Modern Hardware
46mJava vs CPU
02h 57mPushing Java to the Limits: Processing a Billion Rows in under 2 Seconds
