diff options
author | Eric Smith <eric@trueblade.com> | 2008-08-18 14:27:38 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2008-08-18 14:27:38 (GMT) |
commit | e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd (patch) | |
tree | 83d9377c099d20153fa1def09adf06f7b963b69e /Lib/threading.py | |
parent | 8e439a16b25c3204ddddb71628d38745cc4299f4 (diff) | |
download | cpython-e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd.zip cpython-e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd.tar.gz cpython-e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd.tar.bz2 |
Backport of r63826.
Optimization of str.format() for cases with str, unicode, int, 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 there's a complication in 2.6 with int, long, and float
because they always expect str format_specs. So in the unicode
version of this optimization, just check for unicode objects. int,
float, long, and str can be added later, if needed.
Diffstat (limited to 'Lib/threading.py')
0 files changed, 0 insertions, 0 deletions