Staging
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
Raw File
Tip revision: e5bdccc77b2a0da0b72f4a6ebbc2d9a1a9680dcd authored by Eric Smith on 18 August 2008, 14:27:38 UTC
Backport of r63826.
Tip revision: e5bdccc
pyproject.vsprops
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
	ProjectType="Visual C++"
	Version="8.00"
	Name="pyproject"
	OutputDirectory="$(SolutionDir)"
	IntermediateDirectory="$(SolutionDir)$(PlatformName)-temp-$(ConfigurationName)\$(ProjectName)\"
	>
	<Tool
		Name="VCCLCompilerTool"
		Optimization="2"
		InlineFunctionExpansion="1"
		EnableIntrinsicFunctions="true"
		AdditionalIncludeDirectories="..\Include; ..\PC"
		PreprocessorDefinitions="_WIN32"
		StringPooling="true"
		ExceptionHandling="0"
		RuntimeLibrary="0"
		EnableFunctionLevelLinking="true"
		WarningLevel="3"
		DebugInformationFormat="3"
		CompileAs="0"
	/>
	<Tool
		Name="VCLinkerTool"
		LinkIncremental="1"
		AdditionalLibraryDirectories="$(OutDir)"
		GenerateDebugInformation="true"
		ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
		SubSystem="2"
		RandomizedBaseAddress="1"
		DataExecutionPrevention="0"
		TargetMachine="1"
	/>
	<Tool
		Name="VCResourceCompilerTool"
		AdditionalIncludeDirectories="..\PC;..\Include"
	/>
	<UserMacro
		Name="PyDllName"
		Value="python26"
	/>
	<UserMacro
		Name="PythonExe"
		Value="$(SolutionDir)\python.exe"
	/>
	<UserMacro
		Name="externalsDir"
		Value="..\.."
	/>
	<UserMacro
		Name="bsddbDir"
		Value="$(bsddb47Dir)"
	/>
	<UserMacro
		Name="bsddbDepLibs"
		Value="$(bsddb47DepLibs)"
	/>
	<UserMacro
		Name="bsddb44Dir"
		Value="$(externalsDir)\db-4.4.20\build_win32"
	/>
	<UserMacro
		Name="bsddb44DepLibs"
		Value=""
	/>
	<UserMacro
		Name="bsddb47Dir"
		Value="$(externalsDir)\db-4.7.25.0\build_windows"
	/>
	<UserMacro
		Name="bsddb47DepLibs"
		Value="ws2_32.lib"
	/>
	<UserMacro
		Name="sqlite3Dir"
		Value="$(externalsDir)\sqlite-3.5.9"
	/>
	<UserMacro
		Name="bz2Dir"
		Value="$(externalsDir)\bzip2-1.0.5"
	/>
	<UserMacro
		Name="opensslDir"
		Value="$(externalsDir)\openssl-0.9.8g"
	/>
	<UserMacro
		Name="tcltkDir"
		Value="$(externalsDir)\tcltk"
	/>
	<UserMacro
		Name="tcltk64Dir"
		Value="$(externalsDir)\tcltk64"
	/>
	<UserMacro
		Name="tcltkLib"
		Value="$(tcltkDir)\lib\tcl85.lib $(tcltkDir)\lib\tk85.lib"
	/>
	<UserMacro
		Name="tcltkLibDebug"
		Value="$(tcltkDir)\lib\tcl85g.lib $(tcltkDir)\lib\tk85g.lib"
	/>
	<UserMacro
		Name="tcltk64Lib"
		Value="$(tcltk64Dir)\lib\tcl85.lib $(tcltk64Dir)\lib\tk85.lib"
	/>
	<UserMacro
		Name="tcltk64LibDebug"
		Value="$(tcltk64Dir)\lib\tcl85g.lib $(tcltk64Dir)\lib\tk85g.lib"
	/>
</VisualStudioPropertySheet>
back to top