Unexpected timing results with file I/O

Christian Heimes lists at cheimes.de
Mon Feb 4 11:04:55 EST 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.

Christian




More information about the Python-list mailing list