Re:Performance in Big Data Land: Every CPU cycle matters
by vvanders on Wednesday October 28, 2015 @08:34PM
(#10468460)
Listen to the parent here, I've seen 10x performance in production Java code just using flatbuffers(and paying the marshaling costs from ByteBuffer).
50x is not unreasonable for C/C++ code that was OO and uses a data oriented approach instead.
Re:Performance in Big Data Land: Every CPU cycle matters
by vitalyd on Wednesday October 28, 2015 @10:11PM
(#10468792)
Memory indirection is the biggest issue indeed. However, I'd also add that java has a terrible performance model, as a language. Unless you stick to primitives only, the abstraction costs start to add up (beyond pointer chasing). It shoves the entire optimization burden onto the JVM which by the time it runs has lost a bunch of semantic and type information in some cases. There are also codegen deficiencies in current hotspot C2 compiler (i.e. generated code subpar compared to roughly equivalent gcc).
Re:Performance in Big Data Land: Every CPU cycle matters
by abc_lisper on Thursday October 29, 2015 @01:01AM
(#10469377)
> In C++, it's common for contained structs to be flat in memory, so accessing a data member in them is just an offset from a base address
JVM inlines virtual method calls as one of its optimizations. See: http://www.oracle.com/technetwork/java/whitepaper-135217.htm...
A lot of big-data work involves pulling out struct fields from a deeply nested composite record, and then performing some manipulation on them.