Vector API for Java
summary
An OpenJDK Panama prototype exposes a Java Vector API that maps explicit data‑parallel code to SIMD (AVX/AVX‑512, NEON, SVE) and is validated with JMH + DTrace samples and HotSpot C2 intrinsics. Concrete results: vectorized hash and array work drops from ~779 to ~282, sepia image code shows ~12–13x, dot product gives ~2x then ~4x after manual unrolling, and Mandelbrot hits ~4–5x. Implementation uses species/factories and masks, requires architecture-aware unrolling and alignment, and currently uses many specialized classes until value types flatten vectors.
AI-written summary · about
chapters (20)
- 0:00Start
- 0:14The Vector Api
- 1:07Goals of this Api
- 8:04Hierarchy
- 8:22Overview
- 13:21Performance
- 15:20Conditional Expressions
- 15:43Masks
- 16:16Generated Code
- 17:10Operational Composition
- 18:14Implementation
- 18:30Disclaimer from Intel
- 19:40Represent Vectors at the Jvm Level
- 22:03Redefined Typed Vectors
- 25:23Binary Operation
- 28:54Vector Box Elimination
- 30:06Sepia Filter
- 32:36Code for a Dot Product
- 35:18Mandelbrot
- 36:41Conclusion
related talks
43mJava Vector API
01h 02mVectors and the Numerics on the JVM
44mHotspot JVM Auto Vectorization and Vector API
48mSIMD Parallel Programming with the Vector API
57mJava Enable Preview: Vector API
56mUsing vectors in Java [...]
12m#BuildPropulsionLab at #DevoxxUK: @jbaruch with @speakjava
54mBeyond the Vector API - A Quest for a Lower Level API
