[Python-checkins] bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)

Victor Stinner webhook-mailer at python.org
Fri Oct 26 09:10:35 EDT 2018


https://github.com/python/cpython/commit/a05bef4f5be1bcd0df63ec0eb88b64fdde593a86
commit: a05bef4f5be1bcd0df63ec0eb88b64fdde593a86
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018-10-26T15:10:29+02:00
summary:

bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)

Visual Studio solution: Set InlineFunctionExpansion to
OnlyExplicitInline ("/Ob1" option) on all projects (in
pyproject.props) in Debug mode on Win32 and x64 platforms to expand
functions marked as inline.

This change should make Python compiled in Debug mode a little bit
faster on Windows. On Unix, GCC uses -Og optimization level for
./configure --with-pydebug.

files:
A Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst
M PCbuild/pyproject.props

diff --git a/Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst b/Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst
new file mode 100644
index 000000000000..262161637b13
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst
@@ -0,0 +1,4 @@
+PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option)
+in pyproject.props in Debug mode to expand functions marked as inline. This
+change should make Python compiled in Debug mode a little bit faster on
+Windows.
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index 6d36977456e0..95b349c077e5 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -42,6 +42,8 @@
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <WholeProgramOptimization>true</WholeProgramOptimization>
       <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
+      <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OnlyExplicitInline</InlineFunctionExpansion>
+      <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">OnlyExplicitInline</InlineFunctionExpansion>
     </ClCompile>
     <ClCompile Condition="$(Configuration) == 'Debug'">
       <Optimization>Disabled</Optimization>



More information about the Python-checkins mailing list