How to accelerate this program?

Georg Wrede georg.wrede at nospam.org
Tue Apr 4 15:07:45 PDT 2006


Dave wrote:
> Lionello Lunesu says...
>> Dave wrote:
>> 
>>> From what I've seen, the bottleneck is probably in I/O. Use
>>> BufferedFile and a buffer for each readline.
>> 
>> C's FILE and fopen also create a buffered stream, so I doubt that
>> will make a difference.
> 
> Yea, but it does make about a 15% difference (with readLine(bufr)
> faster). I/O is definately not the bottleneck though - my test data
> was screwed up in that it was only doing 4 AA inserts, which is the
> actual bottleneck.

If I'd do this program, the first thing I'd look for is the "sector 
size" of the media from which the file is read. Then I'd have the buffer 
that size.



More information about the Digitalmars-d mailing list