Skip to content

gh-125022: add support for simple SIMD features detection #125011

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

Open
wants to merge 64 commits into
base: main
Choose a base branch
from

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Oct 5, 2024

In #124951, there has been some initial discussion on improving the performances of base64 and possibly {bytearray,bytes,str}.translate using SIMD instructions.

More generally, if we want to use specific SIMD instructions, it'd be good if we at least know whether we can use them or not. This PR is a PoC, experimental and (hence the skip news).

Note that the detection is essentially based on what was done in the blake2 module (though the flags being detected are different in this case but we can always add all those that are needed). To prepare for a harder detection of AVX instructions support, I added all the flags that are known to CPUID and possibly relevant. Note that more work needs to be done for a production use, especially in autoconf I think.

Note

The detection of a wider large family of CPUs (here we just assume Intel for simplicity and because we don't want to be overcomplicated for now) is still an ongoing work.

cc @gpshead

@picnixz picnixz added skip issue skip news build The build process and cross-build labels Oct 5, 2024
@picnixz picnixz force-pushed the core/simd-helpers branch from b4de356 to c33fb91 Compare October 6, 2024 09:20
@picnixz picnixz force-pushed the core/simd-helpers branch from c33fb91 to 3c0b4f1 Compare October 6, 2024 09:24
@picnixz picnixz marked this pull request as ready for review October 6, 2024 09:49
@picnixz picnixz requested review from a team, erlend-aasland and corona10 as code owners October 6, 2024 09:49
@picnixz picnixz changed the title Add support for simple SIMD features detection in autoconf (PoC) gh-125022: add support for simple SIMD features detection (PoC) Oct 6, 2024
@picnixz picnixz removed the skip issue label Oct 6, 2024
@picnixz picnixz changed the title gh-125022: add support for simple SIMD features detection (PoC) gh-125022: add support for simple SIMD features detection Oct 7, 2024
@picnixz picnixz marked this pull request as draft July 8, 2025 17:28
@picnixz picnixz marked this pull request as ready for review July 12, 2025 12:50
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 12, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit d6213a5 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F125011%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review build The build process and cross-build skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy