From: "M. Edward (Ed) Borasky" Date: 2007-09-21T23:13:15+09:00 Subject: Re: How fast does your Ruby run? Josip Gracin wrote: > SpringFlowers AutumnMoon wrote: >> How fast does your Ruby run? >> >> I got 53648 iterations per second running the following program, >> on an Intel 3.2 GHz HT, Win XP machine: > > Here's something interesting. The processor is Intel T7200 @ 2.00GHz, > Linux Ubuntu. > > 1. With ruby 1.8.5. which comes packaged with Ubuntu: > > Ruby 1.8.5 on i486-linux > It took 20.346013 seconds to run. 49149 iterations per > second. > > 2. With ruby 1.9.0 (2006-06-08) which comes packaged in Ubuntu: > > Ruby 1.9.0 on i486-linux > It took 23.875774 seconds to run. 41883 iterations per > second. > > > 3. With ruby 1.8.6 compiled from sources on the machine: > > Ruby 1.8.6 on i686-linux > It took 7.107875 seconds to run. 140689 iterations per > second. > > > Obviously, the target instruction set matters quite a lot. I think I'll > be compiling my own ruby from now on. :-) Make sure you use the appropriate "march=" flag when you do. See http://www.jhaampe.org/software/ruby-gcc for the details.