eric.smith
2008-08-18 17:16:20 UTC
Author: eric.smith
Date: Mon Aug 18 19:16:20 2008
New Revision: 65820
Log:
Blocked revisions 65814 via svnmerge
........
r65814 | eric.smith | 2008-08-18 10:27:38 -0400 (Mon, 18 Aug 2008) | 12 lines
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.
........
Modified:
python/branches/py3k/ (props changed)
Date: Mon Aug 18 19:16:20 2008
New Revision: 65820
Log:
Blocked revisions 65814 via svnmerge
........
r65814 | eric.smith | 2008-08-18 10:27:38 -0400 (Mon, 18 Aug 2008) | 12 lines
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.
........
Modified:
python/branches/py3k/ (props changed)