From: BIl Kleb Date: 2009-02-25T15:44:15+09:00 Subject: Re: 1.9.1 regex 6.5 times slower than 1.8.6 in at least one case Michael Brooks wrote: > > However, in one case, when using a regular expressions (posted here by > someone a long time ago) which I use to determine what numbers in > 0..10000 are prime numbers, version 1.9.1 was at least 6.5 times slower > (1.8.6 = 67 secs, 1.9.1 = 457 secs). I found similar results lately, but the difference was more like a factor of 12! RUBY 1.8.6: $ cd FUN3D $ find . -name \*_c.\?90 -exec rm {} \; $ time ruby Ruby/complex_transformations_spike.rb [...] real 0m25.221s user 0m22.292s sys 0m0.759s $ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0] (as comes with OS X) RUBY 1.9.1: $ cd /usr/local/src $ wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.gz $ tar zxf ruby-1.9.1-p0.tar.gz $ cd ruby-1.9.1-p0 $ ./configure --program-suffix=19 --enable-shared $ make $ sudo make install $ cd - $ time ruby19 Ruby/complex_transformations_spike.rb [...] real 5m18.188s user 4m54.253s sys 0m2.866s $ ruby19 -v ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-darwin9.6.0] Regards, -- Bil Kleb http://fun3d.larc.nasa.gov