[pypy-dev] Unicode encode/decode speed (cont)
Amaury Forgeot d'Arc
amauryfa at gmail.com
Mon Feb 18 20:15:50 CET 2013
2013/2/18 Alex Gaynor <alex.gaynor at gmail.com>
> So, iter(file).next() is slow?
Yes, but only with "rU" mode.
My benchmark with yesterday's build:
$ ~/pypy/pypy-c-jit-60005-0f1e91da6cb2-linux64/bin/pypy -m timeit "fp =
open('/tmp/large-text-file'); list(fp)"
10 loops, best of 3: 43.5 msec per loop
$ ~/pypy/pypy-c-jit-60005-0f1e91da6cb2-linux64/bin/pypy -m timeit "fp =
open('/tmp/large-text-file', 'rU'); list(fp)"
10 loops, best of 3: 638 msec per loop
15 times slower...
--
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130218/af9670e6/attachment.html>
More information about the pypy-dev
mailing list