4 ms·
Can one get state-of-the-art speeds for Vector/Matrix Arithmetic from a Java application? Or is it necessary to use C++ to be “closer to the metal.”
by nelsondev 5y ago
Can one get state-of-the-art speeds for Vector/Matrix Arithmetic from a Java application? Or is it necessary to use C++ to be “closer to the metal.”
- jamesfinlayson 5y agoDepends what version you're using - I think Java 17 has improved vector maths capabilities, or it might still be in the incubator (but useable). I haven't looked at the API to see what it gives you though.
- pjmlp 5y agoBesides the upcoming vector library (already mentioned as incubation in Java 17), at least on OpenJDK, Intel did some AVX autovectorization work. Other than that, there are libraries that allow you to call CUDA from Java, like TVM and TornadoVM.
- adgjlsfhk1 5y agoJava really sucks for this kind of work. Auto-boxing makes it really easy to accidentally end up with Objects which will kill performance. Also, Java doesn't give you good access to bit manipulation, processor intrinsics, or other useful low level tools.