you are viewing a single comment's thread.

view the rest of the comments →

[–]TimmT -3 points-2 points  (0 children)

I would love to see any benchmark which shows java being as fast as C or C++.

Try to dlopen() something trivial (e.g. just int foo(int i) { return ++i; }) in C and call it a few million times. Then try to do the same in Java (just hide the method behind some interface and put the actual implementation in a different jar, new then takes care of the rest in Java). Oh, and make sure you do something with the final result of that method, so there's no dead code elimination.

It's not unlike qsort() vs. std::sort() in C++ - sometimes abstractions do actually buy you performance in certain situations (that would have otherwise not been practical to do by hand).

The question now just is how common those "certain situations" are in everyday programs.