Performance of sequence, stream and collection on the JVM
summary
The talk measures and compares performance of Kotlin Sequence, Java Stream, and plain Collections on the JVM. It explains how Kotlin Sequence and Java Stream work under the hood, shows when each approach gives performance benefits (and how large those benefits are), and examines JVM-related nuances and surprising performance patterns using a JIT profiler to explain them.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:09Goal and structure
- 4:27Collections vs lazy ops
- 7:15Performance measurement method
- 9:23Single ops results
- 12:02Distinct and sorted results
- 17:43Take and drop results
- 21:19Grouping results
- 24:13Multiple ops results
- 28:10Anomaly causes
- 28:53HotSpot VM analysis
- 31:51Method compilation issues
- 34:01Inlining impact
- 36:11Metamorphism problem
- 38:51SingleMethod solution
- 40:02Results across JVMs
- 42:30Android vs JVM differences
- 42:52Summary and recommendations
related talks
57mTwo Sloths from the Java Universe
47mWhen Greed Is Good: Understanding Java Stream Performance
10mJava streams performance and optimization
01h 00mLet’s Get to the Rapids: Java 8 Stream Performance
01h 00mKotlin Recipes
58mGroovy, Java, and Kotlin
44mI didn't know you could do that with Java Streams!
51mSecrets of top performance in Java revealed
