Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 32bit Python on Windows with SSE2 instruction set #80538

Closed
animalize mannequin opened this issue Mar 19, 2019 · 1 comment
Closed

Build 32bit Python on Windows with SSE2 instruction set #80538

animalize mannequin opened this issue Mar 19, 2019 · 1 comment
Labels
3.8 only security fixes build The build process and cross-build OS-windows

Comments

@animalize
Copy link
Mannequin

animalize mannequin commented Mar 19, 2019

BPO 36357
Nosy @pfmoore, @tjguk, @zware, @zooba, @animalize

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2019-03-19.14:03:14.241>
created_at = <Date 2019-03-19.04:36:08.073>
labels = ['build', '3.8', 'OS-windows']
title = 'Build 32bit Python on Windows with SSE2 instruction set'
updated_at = <Date 2019-03-19.14:03:14.240>
user = 'https://github.com/animalize'

bugs.python.org fields:

activity = <Date 2019-03-19.14:03:14.240>
actor = 'malin'
assignee = 'none'
closed = True
closed_date = <Date 2019-03-19.14:03:14.241>
closer = 'malin'
components = ['Build', 'Windows']
creation = <Date 2019-03-19.04:36:08.073>
creator = 'malin'
dependencies = []
files = []
hgrepos = []
issue_num = 36357
keywords = []
message_count = 1.0
messages = ['338317']
nosy_count = 5.0
nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'malin']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue36357'
versions = ['Python 3.8']

@animalize
Copy link
Mannequin Author

animalize mannequin commented Mar 19, 2019

On windows, it seems 32bit builds (3.7.2/3.8.0a2) don't using SSE2 sufficiently.

I test on 3.8 branch, python38.dll only uses XMM register 28 times. The official build is the same.
After enable this option, python38.dll uses XMM register 11,704 times.

--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -88,6 +88,7 @@
       <AdditionalIncludeDirectories Condition="$(IncludeExternals)">$(zlibDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <PreprocessorDefinitions Condition="$(IncludeExternals)">_Py_HAVE_ZLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <EnableEnhancedInstructionSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
     </ClCompile>
     <Link>
       <AdditionalDependencies>version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>

x86 instruction set has only a few number of registers.
In my understanding, using XMM registers on 32bit build will brings a small speed up.
I'm not an expert of this kind knowledge, sorry if I'm wrong.

@animalize animalize mannequin added 3.8 only security fixes build The build process and cross-build OS-windows labels Mar 19, 2019
@animalize animalize mannequin closed this as completed Mar 19, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes build The build process and cross-build OS-windows
Projects
None yet
Development

No branches or pull requests

0 participants