Richard Oudkerk added the comment: The attached patch (readall-resize.patch) makes the resizes only happen when the buffer is full. It produces
amount = 1 MB; time taken = 0.02 secs; rate = 64.10 MB/s amount = 2 MB; time taken = 0.03 secs; rate = 64.10 MB/s amount = 4 MB; time taken = 0.06 secs; rate = 64.10 MB/s amount = 8 MB; time taken = 0.08 secs; rate = 102.56 MB/s amount = 16 MB; time taken = 0.17 secs; rate = 93.24 MB/s amount = 32 MB; time taken = 0.31 secs; rate = 102.56 MB/s amount = 64 MB; time taken = 0.70 secs; rate = 91.17 MB/s amount = 128 MB; time taken = 1.81 secs; rate = 70.73 MB/s ---------- Added file: http://bugs.python.org/file26959/readall-resize.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15758> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com