On Sun, 19 Nov 2006 16:13:31 +0900, M. Edward (Ed) Borasky wrote: > stef wrote: >> On Sun, 19 Nov 2006 14:36:05 +0900, Roseanne Zhang wrote: >> >> >>> 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!!!! >>> >>> >>> >> >> thanks for the info; i see that i was not the only one with that idea >> (whether pre-conceived or not). >> i have to say that o/all i have seen java slower than c++ but NOT always >> e.g. my programmer friend who can write in java really complex aps yet >> super fast, user friendly and pleasant to the eye.... he tells me it is >> because he knows how to program (and because JVM's r better than they used >> to be.) >> >> he might have a point there..... >> > Ayup ... ask the jRuby folks about that :). Of course, there is YARV > coming down the pike, and Rubinius, and the various Ruby on CLR > implementations. > > Then again, for pure number crunching, there's no reason in the world > Ruby's NArray can't run at full floating point speed on at least a > modern x86-32 platform. This stuff is what we call "embarrassingly > parallel". :) >> >> > > sounds good to me ;)