Windows ports: performance of cygwin vs mswin32 ruby

Hi,

I found that recently released ruby 1.6.8 from the
distribution from The Pragmatic Programmers (not to blame them)
is MUCH slower in my IO-processing scripts than their previous
ruby 1.6.5. I figured out that 1.6.5 was based on cygwin
while 1.6.8 is “native” mswin32.

Here is the simple test and results:

$ cat io_test.rb
f=open(ARGV[0],“r”)
f.binmode
slice=1024*1024
while true
s=f.read(slice)
if s==nil
break
end
end
puts f.tell
f.close

$ ruby -v
ruby 1.6.5 (2001-09-19) [i386-cygwin]

$ time ruby io_test.rb mpich.tar.gz
12313304

real 0m0.441s
user 0m0.020s
sys 0m0.000s

$ /cygdrive/d/Programs/ruby/bin/ruby -v
ruby 1.6.8 (2002-12-24) [i586-mswin32]

$ time /cygdrive/d/Programs/ruby/bin/ruby io_test.rb mpich.tar.gz
12313304

real 0m34.129s
user 0m0.010s
sys 0m0.010s

So “proccessing” of file ~12Mb takes 0.5 and 30 seconds!

What could be a reason of such a slowness of mswin32-ruby?

Hi,

···

At Sun, 26 Jan 2003 22:20:24 +0900, Ilya Vazhev wrote:

What could be a reason of such a slowness of mswin32-ruby?

To handle signals correctly. It has been improved in 1.7 or
later.


Nobu Nakada

Yes, ruby 1.8.0 [i386-mswin32] works fine,
Thx.

···

On Sun, Jan 26, 2003 at 11:53:26PM +0900, nobu.nokada@softhome.net wrote:

Hi,

At Sun, 26 Jan 2003 22:20:24 +0900, > Ilya Vazhev wrote:

What could be a reason of such a slowness of mswin32-ruby?

To handle signals correctly. It has been improved in 1.7 or
later.


Nobu Nakada


Ilya