From: Wilson Bilkovich Date: 2006-03-27T05:04:18+09:00 Subject: Re: Speed issue on Windows 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. On 3/26/06, M. Edward (Ed) Borasky wrote: > P.S.: I have a P4/1 GB/SATA disk workstation that's dual-booted Gentoo > Linux and XP Professional, and I've got CygWin on the Windows side. If > there are some reasonable benchmarks in Ruby, I could run them with the > CygWin Ruby (1.8.4 IIRC), Curt Hibbs' One Click and the stock Gentoo > Ruby (compiled with gcc 3.4 and optimized O3 with march=pentium4). To > keep things fair, I'll stick to processor-bound benchmarks; I'm not sure > it's valid to compare NTFS with ext2 filesystems. > > Anybody here have any favorite Ruby benchmarks? In the absence of any > other ideas, I'll probably do a 100x100 matrix factorization using the > standard Matrix/Mathn/Rational/Complex packages. That should give the > interpreter a pretty good workout. > > Wilson Bilkovich wrote: > > On 3/25/06, rtilley wrote: > > > >> Larry Kelly wrote: > >> > >>> What progress is being made to improve Ruby's speed on Windows > >>> platforms. I'm finding much slower on Windows, especially Windows 2003 > >>> Server. > >>> > >>> > >> How are you using Ruby? I find its performance acceptable on XP and > >> 2003. I use both Python and Ruby for many common systems administration > >> and automation tasks. IMO, Python and Ruby perform about the same. In > >> some areas, Ruby is faster... I've found this to be especially true when > >> working with WMI. > >> > >> > > > > I've found Ruby IO and database connectivity to be significantly > > slower on Windows (identical and near-identical hardware) than on > > Linux. Even IRB takes a noticeably longer time to reach a usable > > state. A particularly nasty test is timing a script using ruby > > -rprofile. The profiling overhead seems to be much greater in > > Windows, which points at some kind of underlying problem. > > Sadly, I don't know enough about instrumenting compiled code to point > > at the problem. > > > > > > > > -- > M. Edward (Ed) Borasky > > http://linuxcapacityplanning.com > > >