From: Michael Selig Date: 2006-11-09T07:24:17+09:00 Subject: Re: Ruby performanmce improvements Hi Ed, Thanks for another benchmark to try. I got around a 30% performance increase! Obviously not as good as YARV, but not too shabby for a few days work, I'd say. I am hoping that a couple of things I have done can also be applied to the YARV version. FYI, it was run on an Athlon 2600+, under Ubuntu 6.06 Linux (kernel 2.6.15-27-686). Both versions of ruby were compiled using GCC 4.0.3 with "-O3". Mike. Standard 1.8.4: /home/mike> ruby-1.8.4 -v MatrixBenchmark.rb 256 ruby 1.8.4 (2005-12-24) [i686-linux] /usr/lib/ruby/1.8/mathn.rb:19: warning: method redefined; discarding old gcd2 /usr/lib/ruby/1.8/mathn.rb:109: warning: discarding old / /usr/lib/ruby/1.8/mathn.rb:113: warning: discarding old / /usr/lib/ruby/1.8/mathn.rb:119: warning: method redefined; discarding old inspect /usr/lib/ruby/1.8/mathn.rb:232: warning: method redefined; discarding old sqrt Matrix of dimension 256 times its inverse = identity? true 71.370000 0.000000 71.370000 ( 71.441071) Optimized 1.8.4: /home/mike> ruby-1.8.4-opt -v MatrixBenchmark.rb 256 ruby 1.8.4-OPT (2005-12-24) [i686-linux] /usr/lib/ruby/1.8/mathn.rb:19: warning: method redefined; discarding old gcd2 /usr/lib/ruby/1.8/mathn.rb:109: warning: discarding old / /usr/lib/ruby/1.8/mathn.rb:113: warning: discarding old / /usr/lib/ruby/1.8/mathn.rb:119: warning: method redefined; discarding old inspect /usr/lib/ruby/1.8/mathn.rb:232: warning: method redefined; discarding old sqrt Matrix of dimension 256 times its inverse = identity? true 49.930000 0.000000 49.930000 ( 49.966208) On Thu, 09 Nov 2006 02:36:37 +1100, M. Edward (Ed) Borasky wrote: > Could you run my matrix benchmark against these and post the results > here? The benchmark is at > > http://rubyforge.org/cgi-bin/viewvc.cgi/MatrixBenchmark/?root=cougar > > I got a 4X improvement by running with YARV the last time I tested this. > > Also, did you use "gprof"? How do your profiles compare with the ones I > posted for the matrix benchmark?