commit | 1d138f1c1a37a630099b629cf42c0bbe46d1344b | [log] [tgz] |
---|---|---|
author | Eric Smith <eric@trueblade.com> | Sat May 31 01:40:08 2008 +0000 |
committer | Eric Smith <eric@trueblade.com> | Sat May 31 01:40:08 2008 +0000 |
tree | 87b3d6cd5844fb390ecfce7851589687bf757ea8 | |
parent | fc8dca27d330f0c7c47713d2557f190c517c170e [diff] |
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.