From: Roseanne Zhang Date: 2006-11-19T14:36:05+09:00 Subject: Re: Ruby vs Java vs c++ El Gato wrote: > Ruby and the speed of C++. Welcome to the club. Strangely enough, > Java's domain really is somewhere between each. Plus, you'll never > truly appreciate a language like Ruby until you deal with a more... > verbose language such as Java. Everybody here or somewhere else take that for granted: Java is slower than C++, but actually that is not true. I thought so too. However, my computational heavy practice proved, to certain extent, otherwise. Interesting enough, I was a very experienced C++ programmer, and learning Java in 2000. I got an very heavy algorithm job. I write the same code in Java and C++. When the algorithm was relatively simple, my C++ code was about twice faster than Java c++/Java = 610/1085. However, when my algorithm became extremely heavy iteration, the result was c++/Java = 26000/12000. Java was more than twice faster than C++. I asked several Java experts include Jason Hunter, Daniel Brookshier about the question, why? The answers are the same, JIT!!!! -- Posted via http://www.ruby-forum.com/.