I love these "x is faster than y" arguments!
I can''t believe how many people get on here claiming such things when they test, say, a bubble sort. Yea. Wow. We all certainly need the fastest bubble sorts--after all, that''s why we use bubble sorts in the first place, right?!
![](wink.gif)
The truth of the matter is that most of the responses in here are correct; the comparison was actually testing the difference in efficiency of the Java compiler/VM and the C/C++ compiler, not the language.
Just like everything, every language has its forte. Even if Java were faster than C, Java is still not the right choice to make a Quake III engine, and expect it to run as quickly as a C version would--indeed this goes more into comparing APIs than the language, but I''m comparing overall usefulness at the moment. It''s a similar argument to that Linux may be 1000x better an operating system than Windows, but Windows still has more good applications than Linux does, overall making Windows more useful--unless, of course, you need a bulletproof server. So, again, everything has its place.
And, you know, if Java really were faster in more than just a simple bubble sort, don''t you think more developers would be using it for big things?
![](wink.gif)
If you think about it, it''s extremely difficult to make interpreted code exactly as fast as native code. I think most will agree with me that this an immutable truth.
I understand that the test was to use the same code. But is that really fair to both languages? I think a more conclusive test would to write the fastest possible Java implementation, then write the fastest possible C implementation (no assembly, of course). Compare those. There are things in C you can never do in Java, and I honestly think that such things will make the difference.