Unexpected timing results with file I/O

Christian Heimes lists at cheimes.de
Mon Feb 4 17:04:55 CET 2008

Steven D'Aprano wrote:
> So, what's going on? Can anyone explain why the code which does more work 
> takes less time?

Short answer: CPU and RAM are much faster than hard disks.

The three loops and the creation of a list costs only a few CPU cycles
compared to flushing the new data to disk.


More information about the Python-list mailing list