How do I use the Intel AVX vector instruction set from Java? It\'s a simple question but the answer seems to be hard to find.
Depending on the work, you may not have to do much. AVX2 is used automatically by JVM on some operations on Arrays and String, on supporting platforms like Haswell onwards and Xeon v3 onwards.
https://software.intel.com/en-us/articles/java-application-performance-improvement-with-intel-xeon-processor-e7-v3
https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX2
From Ryzen 3 / Epyc Rome, you'll also have single cycle AVX2 on AMD processors: https://www.anandtech.com/print/14525/amd-zen-2-microarchitecture-analysis-ryzen-3000-and-epyc-rome
Direct use of the instructions and intrinsics are not easily available though.