4 ms·
> 10x gaps occur whenever you have to interface Java with the real world—disks, memory, CPUs, virtual memory subsystems, networking stacks, etc. to get high-per
by tom_mellior 6y ago
> 10x gaps occur whenever you have to interface Java with the real world—disks, memory, CPUs, virtual memory subsystems, networking stacks, etc. to get high-performance.
As noted before, the CPU- and memory-intensive benchmarks upthread don't even show a factor of 10x. Despite the fact that the C++ is heavily hand-optimized in ways that are not accessible to Java programs, and the benchmarks being very short running, so heavily penalizing Java's JIT compilation. Please come off the 10x horse, it makes you look like you are arguing from prejudice, not from data. Even for hyperbole 10x is way too much.
I have experience working on high-performance compilers for both Java and C++, and I can promise you that Java compilers don't generate so very different code for using the CPU or memory. Yes, Java has some overheads, but it also has some tricks up its sleave.
- nicoburns 6y ago10x does seem like too much (although no doubt there are some cases where this happens). JavaScript is usually faster than that these days.