3 ms·
I think your logic is flawed. I will agree with it if you will replace "for most practical programs" by "for most in-house or agency-coded enterprise applicatio
by nivertech 13y ago
I think your logic is flawed. I will agree with it if you will replace "for most practical programs" by "for most in-house or agency-coded enterprise applications".
Another point is that Java bytecode doesn't have SIMD primitives, so unless JIT can do SIMD-optimizations, any SIMD-aware C/C++ compiler will beat Java.
This is especially relevant for the kind of task this article discusses: PFOR Delta integer compression.
- pron 13y agoSIMD for Java is a long time coming. It doesn't change my statement though, because obviously, you can write small snippets of code, or benchmarks, where C beats Java. I was saying that for a large program (and there are few large programs whose performance depends on SIMD), Java usually beats C. Actually, there are other changes that would improve Java performance more than SIMD, like value types. The lack of value types causes many unnecessary cache faults in Java programs.
- beagle3 13y ago> I was saying that for a large program (and there are few large programs whose performance depends on SIMD), Java usually beats C. That goes counter to my experience. Care to share your anecdata here?
- pron 13y agoI thought I did. I've been involved with porting large C++ programs to Java (mostly soft real-time defense applications). We've always seen a significant performance increase (not due to newer hardware). Like I said, this happens for two reasons: large maintainable programs require virtual methods that are hard for the C++ compiler to optimize, and Java opens a whole new realm of possibilities with scalable non-blocking data structures. I would say this is true for most large applications, but untrue in particular circumstances: Java does not excel in many cases of numeric computation (where value types, and, yes, SIMD, would be of assistance). Also, Java is the wrong choice if startup time is important.