From: Todd Burch Date: 2007-09-21T08:35:16+09:00 Subject: Re: How fast does your Ruby run? Todd Burch wrote: > SpringFlowers AutumnMoon wrote: >> How fast does your Ruby run? > Ruby 1.8.2 on universal-darwin8.0 > It took 6.383342 seconds to run. 156657 iterations per second. > > (I had to take out RUBY_PATCHLEVEL, as that's not defined, but I suspect > I could have put a begin/rescue/end in around and STILL have eaten your > lunch. LOLOLOLOL > Ruby 1.8.2 on universal-darwin8.0 It took 5.920011 seconds to run. 168918 iterations per second. I changed the scope of x & y and eeked out some more speed. x, y = nil for i in 1..n t = (1..10).inject {|x, y| x + y } end -- Posted via http://www.ruby-forum.com/.