This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients amaury.forgeotdarc, benjamin.peterson, loewis, pitrou
Date 2008-08-01.20:11:39
SpamBayes Score 0.0072865305
Marked as misclassified No
Message-id <1217621494.5918.24.camel@fsol>
In-reply-to <1217606100.489331d4ac51e@imp.free.fr>
Content
Attaching a new patch with better performance characteristics than my
previous one, and the non-blocking test rewritten in a sane way.

Some timeit runs:

-s "import io; f=io.open('/dev/null', 'wb'); s=b'a'*1" "for i in xrange(100): f.write(s)"

without patch: 533 usec per loop
with patch: 724 usec per loop
with builtin open(): 59.6 usec per loop

-s "import io; f=io.open('/dev/null', 'wb'); s=b'a'*100" "for i in xrange(100): f.write(s)"

without patch: 563 usec per loop
with patch: 768 usec per loop
with builtin open(): 67.8 usec per loop

-s "import io; f=io.open('/dev/null', 'wb'); s=b'a'*10000" "for i in xrange(100): f.write(s)"

without patch: 1.35 msec per loop
with patch: 1.34 msec per loop
with builtin open(): 194 usec per loop

-s "import io; f=io.open('/dev/null', 'wb'); s=b'a'*100000" "for i in xrange(100): f.write(s)"

without patch: 4.92 msec per loop
with patch: 1.34 msec per loop
with builtin open(): 199 usec per loop

-s "import io; f=io.open('/dev/null', 'wb'); s=b'a'*1000000" "for i in xrange(100): f.write(s)"

without patch: 173 msec per loop
with patch: 1.35 msec per loop
with builtin open(): 194 usec per loop
Files
File name Uploaded
bufferedwriter2.patch pitrou, 2008-08-01.20:11:36
History
Date User Action Args
2008-08-01 20:11:41pitrousetrecipients: + pitrou, loewis, amaury.forgeotdarc, benjamin.peterson
2008-08-01 20:11:40pitroulinkissue3476 messages
2008-08-01 20:11:39pitroucreate