From: Reid Thompson Date: 2007-09-22T13:00:15+09:00 Subject: Re: How fast does your Ruby run? Todd Benson wrote: > On 9/21/07, xx xx wrote: >> xx xx wrote: >>> hello ! >>> >>> My hardware: >>> Laptop Asus A6TC - Debian Sid i386 >>> AMD Thurion64x2 >>> >>> uname -a: >>> Linux adom 2.6.22.5 #1 SMP Wed Aug 29 01:16:06 CEST 2007 i686 GNU/Linux >>> >>> --------------- >>> tests: >>> >> >> Sorry for "269313 iterations" in my previous post - i couldn't edit it >> >> btw. what is a "version though *ducks* " ? > > lol. I imagine he doesn't want to get swatted by ruby purists. He > compiled into machine code instead of using the interpreter? > > For what it's worth, I was able to have an 800MHz machine do 30 > seconds with the 1.8.6 standard build from source by disabling the GC > in irb and loading via... > > irb> load "test.rb" > > Standard time during normal computer operation for executing the OP's > code was around 49+/-5 seconds. Normal operation included having a > heavy use network session mixed with X Windows open and a window > manager. > > I pushed it to do less than 20 seconds by rewriting the code > (cheating) to omit the inject method, making it look ugly with while > loops, and also leaving out the puts/p/print methods. > > I will confirm that it was extremely easy to beat the one-click > install on a newer/faster Windows machine with 1.8.6. Nothing against > that, though, because making a clean install of anything on Windows is > nothing less than an act of God (nothing against the Windows fans > either; it justs seems harder than it needs to be; I think this will > change eventually). I have yet to attempt Cygwin or MingW building on > a Windows system, though. I haven't tried the 1.9 installer yet, > either. > > Todd I've built using cygwin several times w/out issue. Not recently though, the setup version has been kept pretty up to date and has been speedy enough for what I use it for. ( results are posted earlier in the thread )