5 ms·
Support for native code is very bad. The JNI is a pain to use and very slow, IPC is often faster. High performance numerical code often suffers because of poor
by alfalfasprout 7y ago
Support for native code is very bad. The JNI is a pain to use and very slow, IPC is often faster. High performance numerical code often suffers because of poor vectorization. Not to mention tuning the JVM is often needed for critical tasks. Modern GC'd languages like Go have much better memory footprints and the penalty of fast numerical code is much smaller.
- cobbzilla 7y agoI thought everyone was using JNA [1] for native access these days. JNA overhead is pretty low, and it’s much simpler to use versus JNI. [1] https://github.com/java-native-access/jna https://github.com/java-native-access/jna
- pron 7y agoPanama (https://openjdk.java.net/projects/panama/ https://openjdk.java.net/projects/panama/) will be replacing JNI very soon, and I don't think you're correct about vectorization. While I think Go has some good features, nothing about it is more "modern" than Java except in the most literal chronological sense; Java is more modern in almost every other meaningful sense. While you may need to tune the VM for critical tasks, in Go you don't need to tune, but rather just run slower.