diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-07 02:26:47 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-07 02:26:47 +0200 |
commit | 4574e62c6e0f52369a67ffae0984004f9aac2ba5 (patch) | |
tree | e749723496031a66fe2749149dd2f29b3f40a9ec /Python/pystrcmp.c | |
parent | 5c0ba36d5ff8d7693c5014b8696e2fab7468afd4 (diff) | |
download | cpython-git-4574e62c6e0f52369a67ffae0984004f9aac2ba5.tar.gz |
Fix massive slowdown in string formatting with str.format.
Example:
./python -m timeit -s "f='{}' + '-' * 1024 + '{}'; s='abcd' * 16384" "f.format(s, s)"
-> before: 547 usec per loop
-> after: 13 usec per loop
-> 3.2: 22.5 usec per loop
-> 2.7: 12.6 usec per loop
Diffstat (limited to 'Python/pystrcmp.c')
0 files changed, 0 insertions, 0 deletions