Author pitrou
Recipients beazley, christian.heimes, donmez, georg.brandl, giampaolo.rodola, pitrou, wplappert
Date 2008-12-16.01:23:10
SpamBayes Score 0.00154723
Marked as misclassified No
Message-id <1229390584.14851.4.camel@localhost>
In-reply-to <1229380080.59.0.620029313372.issue4561@psf.upfronthosting.co.za>
Content
Without Christian's patch:

[400KB.txt] read one byte/char at a time...          0.2685 MB/s (100% CPU)
[400KB.txt] read 20 bytes/chars at a time...          4.536 MB/s (98% CPU)
[400KB.txt] read one line at a time...                3.805 MB/s (99% CPU)
[400KB.txt] read 4096 bytes/chars at a time...        29.23 MB/s (100% CPU)

[ 20KB.txt] read whole contents at once...            52.42 MB/s (99% CPU)
[400KB.txt] read whole contents at once...            45.83 MB/s (100% CPU)
[ 10MB.txt] read whole contents at once...            48.78 MB/s (99% CPU)

With the patch:

[400KB.txt] read one byte/char at a time...          0.2761 MB/s (100% CPU)
[400KB.txt] read 20 bytes/chars at a time...          4.656 MB/s (99% CPU)
[400KB.txt] read one line at a time...                3.956 MB/s (98% CPU)
[400KB.txt] read 4096 bytes/chars at a time...        33.85 MB/s (100% CPU)

[ 20KB.txt] read whole contents at once...            66.17 MB/s (99% CPU)
[400KB.txt] read whole contents at once...            56.65 MB/s (99% CPU)
[ 10MB.txt] read whole contents at once...            63.69 MB/s (99% CPU)

Python 2.6's builtin file object:

[400KB.txt] read one byte/char at a time...           1.347 MB/s (97% CPU)
[400KB.txt] read 20 bytes/chars at a time...          26.65 MB/s (99% CPU)
[400KB.txt] read one line at a time...                184.4 MB/s (100% CPU)
[400KB.txt] read 4096 bytes/chars at a time...         1163 MB/s (99% CPU)

[ 20KB.txt] read whole contents at once...             1072 MB/s (100% CPU)
[400KB.txt] read whole contents at once...            889.1 MB/s (100% CPU)
[ 10MB.txt] read whole contents at once...              600 MB/s (100% CPU)
History
Date User Action Args
2008-12-16 01:23:13pitrousetrecipients: + pitrou, georg.brandl, beazley, giampaolo.rodola, christian.heimes, donmez, wplappert
2008-12-16 01:23:11pitroulinkissue4561 messages
2008-12-16 01:23:10pitroucreate