Hacker News new | past | comments | ask | show | jobs | submit login

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.”



Java 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.


Besides 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.


Depends 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: