From: Roger Pack Date: 2008-03-22T06:40:26+09:00 Subject: Re: any tricks to speed up ruby? > and voila, a faster Ruby (not sure if the real reason was the compiler > flags, the pthread, or the updated version from p110 to p114, but > something helped it--I'm guessing it was the compiler options). > > new ruby with compiler options: > time ./ruby -e "10000000.times {}" > real 0m4.049s > > > old ruby (the mac osx port one): > time ruby -e "10000000.times {}" > real 0m5.400s So turns out that the difference seems to be that between p110 and p114. compiler options were maybe 0.2s difference. Some interesting benchmarks: p110 5.4s p111 5.23s p114 4.1s latest stable snapshot from the ruby-lang page: 5.8s [latest snapshot build doesn't run since it appears to be based on 1.9 (?) ] Anybody have any idea what might going on here? All compiled similarly, p114 seems to smoke the rest. Thanks. -R [Fri Mar 21 15:39:11 ~/Downloads/ruby-1.8.6-p114 ]$ time ./ruby -e "10000000.times {}" real 0m4.143s user 0m3.601s sys 0m0.026s [Fri Mar 21 15:39:18 ~/Downloads/ruby-1.8.6-p114 ]$ time ruby -e "10000000.times {}" # 'normal' ruby p111 real 0m5.742s user 0m4.616s sys 0m0.063s -- Posted via http://www.ruby-forum.com/.