How to make your electrons do more in Java
summary
Java 16+ exposes SIMD via the Vector API and shows real gains: a max-search prototype falls from ~36 ms to ~20 ms when reduced into vector operations, and large-array sums and reductions run noticeably faster than scalar loops. A separate pipeline uses TornadoVM to compile static Java methods to GPU/FPGA kernels, transfer arrays, and hide drivers and memory chores; a ray-tracer example runs ~1.5 FPS on a single-thread CPU, ~3 FPS with parallel streams, and much faster on GPU. The system uses dynamic reconfiguration to pick CPU vs GPU based on transfer and compute costs.
AI-written summary · about
chapters (16)
- 0:00Introduction and speaker background
- 1:09What SIMD instructions are
- 5:25History of SIMD in hardware
- 9:19SIMD in Java and JVM optimizations
- 10:23Java 16 Vector API introduction
- 11:49Vector API demo setup
- 17:16Vector API performance demo
- 19:06Pros and cons of Vector API
- 21:18Can Java utilize GPUs?
- 23:28Challenges of GPU programming
- 25:12Attempts to integrate GPUs in Java
- 26:58Introducing TornadoVM
- 28:43TornadoVM annotation approach
- 32:20TornadoVM performance with Ray Tracer
- 37:42Pros and cons of TornadoVM
- 38:47Q&A session
related talks
43mHow to make your electrons do more in Java?
51mJava at Speed: Getting the Most Out of Modern Hardware
44mHotspot JVM Auto Vectorization and Vector API
46mJava vs CPU
56mUsing vectors in Java [...]
43mFrom CPU to GPU and FPGAs: Supercharging Java Applications with TornadoVM
44mVector API for Java
51mJava on the GPU Where are we now?
