From: Clifford Heath Date: 2002-06-21T10:48:39+09:00 Subject: Re: Why is I/O slow? Yukihiro Matsumoto wrote: > It's due to stdio buffering. But our tests on Linux with fread and glibc indicate that there is no extra buffering happening. stdio is *capable* of buffering, but in this case it isn't *actually* buffering (it's not possible to move A->B->C as fast as A->C, from my argument about bandwidth). stdio libraries that still do double copies must surely be rare now...? > In the future version, Ruby will do its > own IO buffering without using stdio, so that it can tweak IO buffer > freely without portability problem. With respect, this doesn't sound like a smart idea. The glibc folk have spent vast effort making it fly, and you want to bypass it? Anyhow, thanks to Radek for the advice, I've got 1.6.7 and the performance of sysread seems comparable to read now. -- Clifford Heath