This talk will cover work on the Hotspot JVM, regarding auto vectorization and the Vector API. Some of this work is new to JDK26 which will be released in March 2026.
The goal is to deliver insights to Java developers interested in performance and vectorization, and demonstrate how to use the full potential of modern CPU vector instruction capabilities.
Auto Vectorization:
Target audience: Can read Java code, understands basics of CPU architecture, is interested in performance and vectorization.
The goal is to deliver insights to Java developers interested in performance and vectorization, and demonstrate how to use the full potential of modern CPU vector instruction capabilities.
Auto Vectorization:
- High level explanation of SuperWord algorithm, how scalar operations are packed into vectors
- Loop shapes: fill, copy, map and reduce
- Extended topics: aliasing and alignment and their performance impact
- Benchmarks on arrays and MemorySegments (project Panama)
- Why use the Vector API? When auto vectorization is not good enough yet. Quick intro to the API
- Various examples, demonstrated with algorithms: compress/filter, prefix sum, shuffle, gather/scatter, simulating branches, etc. and benchmarks
- Performance pitfalls: unavailable instructions, alignment, store-to-load-forwarding failures, branch misprediction vs latency etc.
Target audience: Can read Java code, understands basics of CPU architecture, is interested in performance and vectorization.