3 ms·
It really depends on what you're doing. The quirks of the JVM mean there are a lot of hidden things you can do wrong and tank your performance.. JNI calls tha
by jbooth 16y ago
It really depends on what you're doing. The quirks of the JVM mean there are a lot of hidden things you can do wrong and tank your performance.. JNI calls that you don't realize you're making, or suboptimal use of objects and creating GC debt. Some of the Java math libraries are randomly slow for certain inputs, as well.
- beagle3 16y agoThat just puts an emphasis on what I said. If there are a lot of hidden things that can go wrong, then in any non-trivial application some of them do, and Java performance is on the average, horrible. The bigger problem is that there's no reasonable way of figuring out what the problem might be. And for the record, said code was a tight loop, created no objects, had the same kind of workload of a sort algorithm; The two nontrivial things about it was that it was accessing multiple simple vectors using the same index (non-idiomatic java), and that one of those vectors was a memory mapped buffer (non-idiomatic java, but essential because of the overuse of memory).