Tomas Brixi <tomas_brixi / yahoo.com> writes: > Hello again, > > I did some finetuning of the FileHash ruby function from the first > mail (atached at the end): read method changed to sysread and voila > :-) > > > mswin ruby jumped from 0.296 MB/s to about 14.250 MB/s !!!! with SHA > hash cygwin ruby from 12.797 MB/s to about 24 MB/s with SHA hash it > even outperformed python :-) > > A nice step ahead :-) > > But what's the problem with File.read method ? Why it is so slow? IO is a lot faster with the ruby 1.7 versions, at least under windows. The sysread function bypasses all the slow parts, which is why you see the speed increase. I bet under ruby 1.7 though, the difference between read and sysread won't be large. -- matt