Staging
v0.8.1
v0.8.1
Revision e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd authored by Eric Smith on 18 August 2008, 14:27:38 UTC, committed by Eric Smith on 18 August 2008, 14:27:38 UTC
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.
1 parent 8e439a1
File | Mode | Size |
---|---|---|
Demo | ||
Doc | ||
Grammar | ||
Include | ||
Lib | ||
Mac | ||
Misc | ||
Modules | ||
Objects | ||
PC | ||
PCbuild | ||
Parser | ||
Python | ||
RISCOS | ||
Tools | ||
.bzrignore | -rw-r--r-- | 673 bytes |
.hgignore | -rw-r--r-- | 866 bytes |
.hgtags | -rw-r--r-- | 3.5 KB |
LICENSE | -rw-r--r-- | 13.4 KB |
Makefile.pre.in | -rw-r--r-- | 37.6 KB |
README | -rw-r--r-- | 55.8 KB |
configure | -rwxr-xr-x | 661.7 KB |
configure.in | -rw-r--r-- | 102.5 KB |
install-sh | -rwxr-xr-x | 7.0 KB |
pyconfig.h.in | -rw-r--r-- | 28.6 KB |
setup.py | -rw-r--r-- | 79.6 KB |
Computing file changes ...