Staging
v0.8.1
https://github.com/python/cpython
Revision 1d138f1c1a37a630099b629cf42c0bbe46d1344b authored by Eric Smith on 31 May 2008, 01:40:08 UTC, committed by Eric Smith on 31 May 2008, 01:40:08 UTC
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.
1 parent fc8dca2
History
Tip revision: 1d138f1c1a37a630099b629cf42c0bbe46d1344b authored by Eric Smith on 31 May 2008, 01:40:08 UTC
Optimization of str.format() for cases with unicode, long, and float
Tip revision: 1d138f1
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
Tools
.bzrignore -rw-r--r-- 635 bytes
.hgignore -rw-r--r-- 866 bytes
.hgtags -rw-r--r-- 2.8 KB
INTBENCH -rw-r--r-- 941 bytes
LICENSE -rw-r--r-- 13.5 KB
Makefile.pre.in -rw-r--r-- 37.0 KB
README -rw-r--r-- 7.0 KB
RELNOTES -rw-r--r-- 2.8 KB
configure -rwxr-xr-x 647.9 KB
configure.in -rw-r--r-- 97.8 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 28.7 KB
runtests.sh -rwxr-xr-x 2.1 KB
setup.py -rw-r--r-- 66.7 KB

README

back to top