[issue12805] Optimizations for bytes.join() et. al

Serhiy Storchaka report at bugs.python.org
Sun Apr 8 21:08:26 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

> Main note: the patched test adds a space to the separator, but that is not enough to account for the difference.

Sorry, I copied the wrong line.

$ ./python -m timeit -s "seq=[bytes([i]*100000) for i in range(256)]" "b' '.join(seq)"
10 loops, best of 3: 45.6 msec per loop

But the conclusions are not affected, for larger byte strings patched
version will be 1.5-2 times slower in limit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12805>
_______________________________________


More information about the Python-bugs-list mailing list