diff options
author | Eric Smith <eric@trueblade.com> | 2008-05-31 01:40:08 +0000 |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2008-05-31 01:40:08 +0000 |
commit | f6755a859030ed37541e9abdaf74cd02ed0cd796 (patch) | |
tree | 44bf9c95af3ce5cf9dbe524f9934e5100027827b /Python/pythonrun.c | |
parent | 45633bdd32f48cbcb8915670dada30d0f45da844 (diff) | |
download | cpython-f6755a859030ed37541e9abdaf74cd02ed0cd796.tar.gz |
Optimization of str.format() for cases with unicode, long, and float
arguments. This gives about 30% speed improvement for the simplest
(but most common) cases. This patch skips the __format__ dispatch, and
also avoids creating an object to hold the format_spec.
Unfortunately, backporting this to 2.6 is going to be more challenging
due to str/unicode issues with format_spec. I'll work on that next.
Then I'll spend some time profiling and see what that tells me.
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions