From: "Simon Kröger" Date: 2006-04-14T06:06:10+09:00 Subject: Re: First script seems slow - What's a better way to write t Charlotte wrote: > Ross Bamford wrote: > >> Wow, on my paltry 1.7Ghz P4 I get: >> >> user system total real >> foo 3.990000 0.040000 4.030000 ( 4.097883) >> bar 3.700000 0.020000 3.720000 ( 3.778370) >> qux 13.640000 0.130000 13.770000 ( 13.914830) >> >> from ruby 1.8.4 (2005-12-24) [i686-linux]. Interestingly (though >> probably of no concern given developmental status), performance was >> significantly worse with 1.9 (especially for qux - around 23 seconds) >> and Oniguruma. > > Could the operating system have an effect on the speed? Without opening or closing a single program/window i benchmarkt this on native windows, colinux-woody and cygwin. ------------------------------------------------------------- C:\temp>ruby -v foobarqux.rb ruby 1.8.4 (2005-12-24) [i386-mswin32] user system total real foo 5.359000 0.062000 5.421000 ( 5.875000) bar 4.969000 0.063000 5.032000 ( 5.391000) qux 18.750000 1.484000 20.234000 ( 22.578000) ------------------------------------------------------------- colinux:~# ruby -v foobarqux.rb ruby 1.8.4 (2005-12-24) [i486-linux] user system total real foo 1.360000 2.510000 3.870000 ( 3.868129) bar 1.160000 2.300000 3.460000 ( 3.460166) qux 2.020000 13.190000 15.210000 ( 15.210472) ------------------------------------------------------------- Simon@XPS /cygdrive/c/temp $ ruby -v foobarqux.rb ruby 1.8.4 (2005-12-24) [i386-cygwin] user system total real foo 3.656000 0.000000 3.656000 ( 3.973000) bar 3.422000 0.000000 3.422000 ( 3.709000) qux 12.813000 0.000000 12.813000 ( 13.991000) ------------------------------------------------------------- Well, I'm puzzled. I thought native windows should be the fastest one on a windows machine. cheers Simon