Staging
v0.5.1
v0.5.1
https://github.com/python/cpython
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
Tip revision: e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd authored by Eric Smith on 18 August 2008, 14:27:38 UTC
Backport of r63826.
Backport of r63826.
Tip revision: e5bdccc
File | Mode | Size |
---|---|---|
_bsddb.vcproj | -rw-r--r-- | 26.8 KB |
_ctypes.vcproj | -rw-r--r-- | 13.1 KB |
_ctypes_test.vcproj | -rw-r--r-- | 8.3 KB |
_elementtree.vcproj | -rw-r--r-- | 11.1 KB |
_hashlib.vcproj | -rw-r--r-- | 10.6 KB |
_msi.vcproj | -rw-r--r-- | 8.8 KB |
_multiprocessing.vcproj | -rw-r--r-- | 9.3 KB |
_socket.vcproj | -rw-r--r-- | 8.8 KB |
_sqlite3.vcproj | -rw-r--r-- | 10.7 KB |
_ssl.vcproj | -rw-r--r-- | 10.6 KB |
_testcapi.vcproj | -rw-r--r-- | 8.4 KB |
_tkinter.vcproj | -rw-r--r-- | 9.3 KB |
bdist_wininst.vcproj | -rw-r--r-- | 5.8 KB |
build.bat | -rw-r--r-- | 488 bytes |
build_env.bat | -rw-r--r-- | 25 bytes |
build_pgo.bat | -rw-r--r-- | 1.1 KB |
build_ssl.bat | -rw-r--r-- | 253 bytes |
build_ssl.py | -rw-r--r-- | 9.2 KB |
build_tkinter.py | -rw-r--r-- | 2.2 KB |
bz2.vcproj | -rw-r--r-- | 11.9 KB |
debug.vsprops | -rw-r--r-- | 310 bytes |
env.bat | -rw-r--r-- | 163 bytes |
field3.py | -rw-r--r-- | 974 bytes |
idle.bat | -rw-r--r-- | 284 bytes |
installer.bmp | -rw-r--r-- | 57.4 KB |
kill_python.c | -rw-r--r-- | 5.5 KB |
kill_python.vcproj | -rw-r--r-- | 4.5 KB |
make_buildinfo.c | -rw-r--r-- | 2.9 KB |
make_buildinfo.vcproj | -rw-r--r-- | 2.8 KB |
make_versioninfo.vcproj | -rw-r--r-- | 6.8 KB |
pcbuild.sln | -rw-r--r-- | 40.1 KB |
pginstrument.vsprops | -rw-r--r-- | 921 bytes |
pgupdate.vsprops | -rw-r--r-- | 379 bytes |
pyd.vsprops | -rw-r--r-- | 565 bytes |
pyd_d.vsprops | -rw-r--r-- | 747 bytes |
pyexpat.vcproj | -rw-r--r-- | 10.0 KB |
pyproject.vsprops | -rw-r--r-- | 2.3 KB |
python.vcproj | -rw-r--r-- | 11.7 KB |
pythoncore.vcproj | -rw-r--r-- | 33.6 KB |
pythonw.vcproj | -rw-r--r-- | 11.3 KB |
readme.txt | -rw-r--r-- | 14.7 KB |
release.vsprops | -rw-r--r-- | 311 bytes |
rmpyc.py | -rw-r--r-- | 598 bytes |
rt.bat | -rw-r--r-- | 1.8 KB |
select.vcproj | -rw-r--r-- | 9.0 KB |
sqlite3.vcproj | -rw-r--r-- | 9.5 KB |
unicodedata.vcproj | -rw-r--r-- | 8.6 KB |
vs9to8.py | -rw-r--r-- | 1.5 KB |
w9xpopen.vcproj | -rw-r--r-- | 10.0 KB |
winsound.vcproj | -rw-r--r-- | 8.6 KB |
x64.vsprops | -rw-r--r-- | 537 bytes |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...