etc.curl: Formal review begin

Walter Bright newshound2 at digitalmars.com
Tue Aug 30 12:56:22 PDT 2011


On 8/30/2011 11:59 AM, Andrei Alexandrescu wrote:
> Unless the OS issues speculative reads (which I don't think it does for either
> files or sockets), any time spent in write() is a net loss for reading speed.
> Now, if write is buffered and the buffers are flushed asynchronously, calls to
> write() would be instantaneous. I'm not sure to what extent the major OSs do
> that, and for what types of files.

The way to test this is to read file by 4096 byte chunks forwards, and compare 
that with the speed of reading it backwards.

The OS will try to cache the file in memory between runs, so to defeat this 
means the file has to be on a removable drive (I use an SD card) and pull the 
drive out and reinsert it between each test.


More information about the Digitalmars-d mailing list