I think you are somewhat right.  I created new files and then shutdown the
system to clear the cache.  On a retry, the times changed to .25 seconds and
.02 seconds.  I think that something else was causing the extreme delay on
the first one.

Guess I should have tested more before commenting.  Thanks for the comments.

-----Original Message-----
From: Alan Chen [mailto:alan / digikata.com]
Sent: October 7, 2002 14:06
To: ruby-talk ML
Subject: Re: File.read Vs. File.sysread performance...


On Tue, Oct 08, 2002 at 01:26:27AM +0900, Allen Mitchell wrote:
> This was using a stable snapshot from about a month ago. And yes, I know
> that sysread is a low level function, but I never expected an improvement
of
> 650X.

Could it be that there are some file IO caching effects that you're seeing
here?
At the very least, I'd reverse the order of the tests as well as have
several
different files (could be identical files) to test.

- alan

--
Alan Chen
Digikata LLC
http://digikata.com