René's URL Explorer Experiment


Title: gh-122288: Improve performances of `fnmatch.translate` by picnixz · Pull Request #122289 · python/cpython · GitHub

Open Graph Title: gh-122288: Improve performances of `fnmatch.translate` by picnixz · Pull Request #122289 · python/cpython

X Title: gh-122288: Improve performances of `fnmatch.translate` by picnixz · Pull Request #122289 · python/cpython

Description: This is a smaller PR compared to the one for the C implementation and is probably easier to review. Below are the benchmarks reported on the issue: +------------------------------------------+-----------------------+-----------------------+ | Benchmark | fnmatch-translate-ref | fnmatch-translate-py | +==========================================+=======================+=======================+ | abc/[!]b-ac-z9-1]/def/\*?/*/**c/?*[][!] | 6.09 us | 3.99 us: 1.53x faster | +------------------------------------------+-----------------------+-----------------------+ | !abc/[!]b-ac-z9-1]/def/\*?/*/**c/?*[][!] | 6.39 us | 4.07 us: 1.57x faster | +------------------------------------------+-----------------------+-----------------------+ | a**?**cd**?**??k*** | 2.24 us | 1.51 us: 1.49x faster | +------------------------------------------+-----------------------+-----------------------+ | a/**/b/**/c | 1.97 us | 1.12 us: 1.76x faster | +------------------------------------------+-----------------------+-----------------------+ | man/man1/bash.1 | 3.00 us | 1.21 us: 2.48x faster | +------------------------------------------+-----------------------+-----------------------+ | a*b*c*d*e*f*g*h*i*j*k*l*m*n*o** | 5.40 us | 3.33 us: 1.62x faster | +------------------------------------------+-----------------------+-----------------------+ | Geometric mean | (ref) | 1.71x faster | +------------------------------------------+-----------------------+-----------------------+ Issue: gh-122288

Open Graph Description: This is a smaller PR compared to the one for the C implementation and is probably easier to review. Below are the benchmarks reported on the issue: +------------------------------------------+-----...

X Description: This is a smaller PR compared to the one for the C implementation and is probably easier to review. Below are the benchmarks reported on the issue: +------------------------------------------+-----...

Opengraph URL: https://github.com/python/cpython/pull/122289

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:bf2b0956-fd69-d7ce-08e9-e1a6adb1b476
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD36E:9E08E:927CFE:B78B8B:6B0217E4
html-safe-noncef648a3a266e00b0ba4341be8637fd183e771ce8a112820d6cf10995aa8a07bd9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzZFOjlFMDhFOjkyN0NGRTpCNzhCOEI6NkIwMjE3RTQiLCJ2aXNpdG9yX2lkIjoiNTMwOTQ2MDIzMjYzMDU3MzAyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbc722387be4d2bde813b336375ec8ef3e150bdde2cb96d09104348d1538f8fe1
hovercard-subject-tagpull_request:1987897269
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/122289/files
twitter:imagehttps://avatars.githubusercontent.com/u/10796600?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10796600?s=400&v=4
og:image:altThis is a smaller PR compared to the one for the C implementation and is probably easier to review. Below are the benchmarks reported on the issue: +------------------------------------------+-----...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/122289/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F122289%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F122289%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/122289/files
Reloadhttps://github.com/python/cpython/pull/122289/files
Reloadhttps://github.com/python/cpython/pull/122289/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
barneygalehttps://github.com/barneygale
python:mainhttps://github.com/python/cpython/tree/main
picnixz:fnmatch-py-implementationhttps://github.com/picnixz/cpython/tree/fnmatch-py-implementation
Conversation 52 https://github.com/python/cpython/pull/122289
Commits 18 https://github.com/python/cpython/pull/122289/commits
Checks 0 https://github.com/python/cpython/pull/122289/checks
Files changed https://github.com/python/cpython/pull/122289/files
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
gh-122288: Improve performances of fnmatch.translate https://github.com/python/cpython/pull/122289/files#top
Show all changes 18 commits https://github.com/python/cpython/pull/122289/files
7f15063 improve performances of `fnmatch.translate` picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/7f15063ad1d0f39f3df43fc54cfa1bc31fe0cbb6
83d0904 add tests picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/83d0904e3ef34cbc3a3980813e4c9e4d9989791f
275a1c7 blurb picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/275a1c78624444cc0c10625e219f0791c30168c4
e60d057 fix usages picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/e60d057bccf37c24b4723eddee7cc66dc9c9c48e
03217d7 keep legacy version for glob picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/03217d7b6dec482a4caa3c2d79b5fbb2041da75b
804da13 actually not needed... picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/804da13fae3ee48f93a5064273af3401a3c8334d
06a3652 Merge branch 'main' into fnmatch-py-implementation picnixz Jul 25, 2024 https://github.com/python/cpython/pull/122289/commits/06a3652b993b94ceb6c0106d537ab1b638a71ea6
baa6ce3 reduce the number of calls to `str.join` picnixz Aug 17, 2024 https://github.com/python/cpython/pull/122289/commits/baa6ce37b3f5908d311e7342f7314896c07edb34
80b22e0 micro-optimization on `re.sub` picnixz Aug 18, 2024 https://github.com/python/cpython/pull/122289/commits/80b22e005087f23cac1551d0daabae4cc00f3f34
7a9a87c address Barney's review picnixz Aug 19, 2024 https://github.com/python/cpython/pull/122289/commits/7a9a87ce23a5599274a5426ac7103d001eb6c073
90539bc Update Misc/NEWS.d/next/Library/2024-07-25-18-06-51.gh-issue-122288.-… picnixz Aug 23, 2024 https://github.com/python/cpython/pull/122289/commits/90539bcd17d3bb3eaf65cbfa18be236a88accc94
1d52949 use lower-case parameter names picnixz Aug 27, 2024 https://github.com/python/cpython/pull/122289/commits/1d52949cc8300437001c8342cb27441f1d8e3cbe
0226437 rename variable `indices` to `star_indices` picnixz Aug 28, 2024 https://github.com/python/cpython/pull/122289/commits/02264371c101929b1e7774ce0c103127887c0bb2
01a5173 remove ambiguous comment about '?' case picnixz Aug 28, 2024 https://github.com/python/cpython/pull/122289/commits/01a51734dcd8031935432fb36997353e764fd616
bb6c3ee change the cache size for `re.escape` picnixz Aug 28, 2024 https://github.com/python/cpython/pull/122289/commits/bb6c3eef37c79f7544e2d5c38c6f7ee19417ad52
c14ce4f Update Lib/fnmatch.py picnixz Oct 18, 2024 https://github.com/python/cpython/pull/122289/commits/c14ce4f7abc18ca5c427c1c3da4d4131f3f3984e
38d3427 Update Lib/test/test_fnmatch.py picnixz Oct 22, 2024 https://github.com/python/cpython/pull/122289/commits/38d342701d84370b2b2f713934f848d153f091ac
78fde7a Merge branch 'main' into fnmatch-py-implementation picnixz Nov 11, 2024 https://github.com/python/cpython/pull/122289/commits/78fde7a854eb8f704ff6f7e426dc6f2f1f0017f0
Clear filters https://github.com/python/cpython/pull/122289/files
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
fnmatch.py https://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
glob.py https://github.com/python/cpython/pull/122289/files#diff-aca8a30d5728898dc8623ab33adb548567e7a0092079954afa1b594b7f83c828
test_fnmatch.py https://github.com/python/cpython/pull/122289/files#diff-c2b05f64bbe1e260a84112533f35dcef70f5cf0cb658d8baed555de6ea1a1927
2024-07-25-18-06-51.gh-issue-122288.-_xxOR.rst https://github.com/python/cpython/pull/122289/files#diff-a40f3851a206e5980899ef5a533365d4735ff17a9b2655a0533107e588fedf61
Lib/fnmatch.pyhttps://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
View file https://github.com/picnixz/cpython/blob/78fde7a854eb8f704ff6f7e426dc6f2f1f0017f0/Lib/fnmatch.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/122289/{{ revealButtonHref }}
https://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
https://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
https://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
https://github.com/python/cpython/pull/122289/files#diff-5078809c85d4fa8475e78198661cd5800368dc1e0f958b93513aac70155dd789
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
Please reload this pagehttps://github.com/python/cpython/pull/122289/files
Lib/glob.pyhttps://github.com/python/cpython/pull/122289/files#diff-aca8a30d5728898dc8623ab33adb548567e7a0092079954afa1b594b7f83c828
View file https://github.com/picnixz/cpython/blob/78fde7a854eb8f704ff6f7e426dc6f2f1f0017f0/Lib/glob.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/122289/{{ revealButtonHref }}
https://github.com/python/cpython/pull/122289/files#diff-aca8a30d5728898dc8623ab33adb548567e7a0092079954afa1b594b7f83c828
https://github.com/python/cpython/pull/122289/files#diff-aca8a30d5728898dc8623ab33adb548567e7a0092079954afa1b594b7f83c828
Lib/test/test_fnmatch.pyhttps://github.com/python/cpython/pull/122289/files#diff-c2b05f64bbe1e260a84112533f35dcef70f5cf0cb658d8baed555de6ea1a1927
View file https://github.com/picnixz/cpython/blob/78fde7a854eb8f704ff6f7e426dc6f2f1f0017f0/Lib/test/test_fnmatch.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/122289/{{ revealButtonHref }}
https://github.com/python/cpython/pull/122289/files#diff-c2b05f64bbe1e260a84112533f35dcef70f5cf0cb658d8baed555de6ea1a1927
https://github.com/python/cpython/pull/122289/files#diff-c2b05f64bbe1e260a84112533f35dcef70f5cf0cb658d8baed555de6ea1a1927
Misc/NEWS.d/next/Library/2024-07-25-18-06-51.gh-issue-122288.-_xxOR.rsthttps://github.com/python/cpython/pull/122289/files#diff-a40f3851a206e5980899ef5a533365d4735ff17a9b2655a0533107e588fedf61
View file https://github.com/picnixz/cpython/blob/78fde7a854eb8f704ff6f7e426dc6f2f1f0017f0/Misc/NEWS.d/next/Library/2024-07-25-18-06-51.gh-issue-122288.-_xxOR.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/122289/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.