in reply to Re^5: removing duplicate lines
in thread removing duplicate lines

I read somewhere that it was good practice to factor out system overheads such as i/o when benchmarking algorithms

That may be a good rule of thumb, but -- as should now be obvious -- it doesn't apply all the time. In this case, the I/O is part of what we're testing. Factoring it out alters the algorithm significantly.

Replies are listed 'Best First'.
Re^7: removing duplicate lines
by johngg (Canon) on Apr 12, 2006 at 09:20 UTC
    I will definitely bear this in mind in future. It had never occurred to me that you could do seeks on the DATA filehandle; that's really neat.

    Thank you for the instruction,

    JohnGG