From: Wilson Bilkovich Date: 2006-03-28T02:15:53+09:00 Subject: Re: Speed issue on Windows On 3/26/06, Joel VanderWerf wrote: > Wilson Bilkovich wrote: > > Try running the built-in sample "cal.rb" with ruby -rprofile. > > I don't have two identical boxes right next to each other right now, but: > > WinXP SP2, dual Xeon 2.8GHz, 2GB of RAM: 5.031 seconds. > > Ubuntu 5.10, single P4 3.0GHz, 1GB of RAM: 2.110 seconds. > > > > Obviously the hardware isn't the same, but they should be much, much > > closer than that. > > cal.rb is a good choice (in my opinion) because it creates and > > compares a very large number of Rational and Fixnum objects. > > 4.94 sec WinXP SP2, single Pentium M, 1.7GHz, 512MB > 1-click installer > > 2.32 sec Ubuntu 5.10, single Pentium M, 1.7GHz, 512MB > built with default build options > > I took the best run out of 10 or so on each platform. Not building the > windows version with architecture specific options might account for > some of the difference. > I just built several versions of Ruby 1.8.4 using various optimizations, including -G7 -Ox (target P4/Xeon architecture, maximum optimization), and compared them to the binaries from ruby-mswin32 and the one click installer. They all actually performed slightly worse than the default settings. Looks like it's not a problem with the compiler flags (which seem finely tuned). I also tried throwing "WITHOUT_PTHREADS" into the Makefile, but since it's not a configure.bat option on Win32, I wasn't surprised when it didn't change anything. --Wilson.