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
Possible slowdown of regex searching in 3.11 #91404
Comments
The 3 regular expression benchmarks in the pyperformance suite, regex_v8, regex_effbot and regex_dna show slowdowns between 3% and 10%. Looking at the stats, nothing seems wrong with specialization or the memory optimizations. Which strongly suggests a regression in the sre module itself, but I can't say so for certain. |
Could you give the two versions? I will do a git bisect. I tested 356997c~1 and 356997c [1], msvc2022 non-pgo release build: # regex_dna ### # regex_effbot ### # regex_v8 ### |
Possibly related to the new atomic grouping support from #76163? |
It seems not likely. |
I wrote a script to automatically benchmark some commits about re module in recent months. Platform: Windows 10, WSL2, Ubuntu 20.04, gcc-9.4.0. The results are in attached file Compare from 08eb754~1 (2022-03-21) to b09184b (2022-04-07):
my_re_benchmark is a benchmark made by myself, it uses 16 patterns to process 100 MiB real text data. |
Not sure how we're supposed to be linking issues to PRs yet, but check out #91495. |
Leaving this open, since it may still be worth exploring where the prior 3.10-to-3.11 slowdown came from. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: