language_fan wrote: > Sun, 20 Sep 2009 18:16:37 -0400, bearophile thusly wrote: > >> My benchmarks aren't chosen randomly, I naturally focus on things that >> are slower in D, so sometimes you can see Java to "win". I usually >> discard the code where Java results slower :-) > > I have seen people many times mention that Java is in general orders of > magnitude slower than D, no matter what kind of algorithms you run on > both environments. This is because of the VM - nothing on a VM can run > faster than native code, they say.
Wow. I actually haven't seen that argument in a relatively long time - it seems to me relatively debunked nowadays. (Personally, for me it comes down to "Java will always have a certain delay on startup, and its thoroughly object-oriented design forces heap access that is often unnecessary for solving the problem; plus the single-paradigm model is woefully constraining in comparison to more flexible languages. " > I personally use a > lot of heap memory allocation in my work, and so far Java has not only > been safer (and provides decent stack traces and no compiler bugs), but > also faster - each time. Yes, heap allocation is faster in Java. There's so much of it they pretty much had no choice but to tune it to hell and back :) > If you decide to hide the bad results > (for D), it will only reinforce the misinformation. Um, he said he hides the bad results _for Java_.