homepage

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 ezio.melotti, pitrou, vstinner
Date 2012年08月11日.10:10:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344679856.22.0.182628916359.issue15612@psf.upfronthosting.co.za>
In-reply-to
Content
Victor, your benchmark is buggy (it writes one character at a time). You should apply the following patch:
$ diff -u bench_stringio_orig.py bench_stringio.py 
--- bench_stringio_orig.py	2012年08月11日 12:02:16.528321958 +0200
+++ bench_stringio.py	2012年08月11日 12:05:53.939536902 +0200
@@ -41,8 +41,8 @@
 ('bmp', '\u20ac' * k + '\n'),
 ('non-bmp', '\U0010ffff' * k + '\n'),
 ):
- bench.bench_func('writer long lines %s' % charset, writer, n // k, text)
- bench.bench_func('writer-reader long lines %s' % charset, writer_reader, n // k, text)
+ bench.bench_func('writer long lines %s' % charset, writer, n, [text])
+ bench.bench_func('writer-reader long lines %s' % charset, writer_reader, n, [text])
 
 for charset, text in (
 ('ascii', 'a' * (n // 10) + '\n'),
@@ -50,8 +50,8 @@
 ('bmp', '\u20ac' * (n // 10) + '\n'),
 ('non-bmp', '\U0010ffff' * (n // 10) + '\n'),
 ):
- bench.bench_func('writer very long lines %s' % charset, writer, 10, text)
- bench.bench_func('writer-reader very long lines %s' % charset, writer_reader, 10, text)
+ bench.bench_func('writer very long lines %s' % charset, writer, 100, [text])
+ bench.bench_func('writer-reader very long lines %s' % charset, writer_reader, 100, [text])
 
 data = 'abc\n' * n
 bench.bench_func('reader ascii', reader, data)
History
Date User Action Args
2012年08月11日 10:10:56pitrousetrecipients: + pitrou, vstinner, ezio.melotti
2012年08月11日 10:10:56pitrousetmessageid: <1344679856.22.0.182628916359.issue15612@psf.upfronthosting.co.za>
2012年08月11日 10:10:55pitroulinkissue15612 messages
2012年08月11日 10:10:54pitroucreate

AltStyle によって変換されたページ (->オリジナル) /