From: Lionel Bouton Date: 2007-10-28T03:34:47+09:00 Subject: Re: How fast does your Ruby run? Daniel Sch�mer wrote: > Gentoo Linux on Intel Pentium 4 2.40GHz (512 KB cache): > > Ruby Patch Platform Seconds Iterations per second > ===== ===== =================== ========= ===================== > 1.8.6 111 i686-linux (gentoo) 32.801483 30486 > 1.8.6 5000 i686-linux 13.607635 73488 > 1.9.0 0 i686-linux 3.988949 250692 > 1.8.5 3876 java 63.589 15725 > 1.8.5 3876 java (-J-server) 44.173 22638 > 1.8.5 3876 java (-O) 36.917 27087 > 1.8.5 3876 java (-O -J-server) 15.194 65815 > > The first is the system installed ruby. IIRC on my Gentoo I got +80% on this particular benchmark with USE="-threads". Given this huge difference I looked at the speedup for the test suite of one of my Rails applications and got only ~ +10%. That said I use Xpath in one Ruby script and the speedup was unbelievable : maybe +1000% (yes 3 zeros, the script took more than a minute, maybe several and with USE="-threads" it went through the data in less than ten seconds). I believe Ruby compiled with pthread is known to have performance problems (at least on Linux as I've seen reports of such behavior on Linux before)... If you want speed on Linux (and maybe other flavours of Unix), you should look at compiling it without pthread. Warning: as some classes may use system libs that *are* compiled with pthread, you might not have this choice (IIRC the pthread support is there just to support such libraries). If someone knows more about this subject (and how to tell if compiling without pthread is safe), I'd love to know the details. Regards, Lionel