René's URL Explorer Experiment


Title: Speed up the parser · Issue #153568 · python/cpython · GitHub

Open Graph Title: Speed up the parser · Issue #153568 · python/cpython

X Title: Speed up the parser · Issue #153568 · python/cpython

Description: This is a catch-all issue to track a series of small, independent speedups to the parser Linked PRs gh-153571 gh-153573 gh-153574 gh-153575 gh-153576 gh-153577 gh-153583 gh-153584 gh-156209 gh-157374 gh-157413 gh-157437 gh-157450 gh-1574...

Open Graph Description: This is a catch-all issue to track a series of small, independent speedups to the parser Linked PRs gh-153571 gh-153573 gh-153574 gh-153575 gh-153576 gh-153577 gh-153583 gh-153584 gh-156209 gh-1573...

X Description: This is a catch-all issue to track a series of small, independent speedups to the parser Linked PRs gh-153571 gh-153573 gh-153574 gh-153575 gh-153576 gh-153577 gh-153583 gh-153584 gh-156209 gh-1573...

Opengraph URL: https://github.com/python/cpython/issues/153568

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Speed up the parser","articleBody":"This is a catch-all issue to track a series of small, independent speedups to the parser\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-153571\n* gh-153573\n* gh-153574\n* gh-153575\n* gh-153576\n* gh-153577\n* gh-153583\n* gh-153584\n* gh-156209\n* gh-157374\n* gh-157413\n* gh-157437\n* gh-157450\n* gh-157465\n* gh-157534\n* gh-160458\n* gh-160616\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2026-07-11T13:56:44Z","url":"https://github.com/python/cpython/issues/153568"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b8fa0b01-e691-9c71-022c-55125f5d85a8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD7EC:172B92:34FDAF2:469826B:6B020369
html-safe-nonce9dce0b75411c2822c5ed9e387da582c1e521400a999f76c57aeea83fdc41ff8c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0VDOjE3MkI5MjozNEZEQUYyOjQ2OTgyNkI6NkIwMjAzNjkiLCJ2aXNpdG9yX2lkIjoiNzM2Mjc2NTE2MDYxMzgwNjk1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5556966e76605b12d32d7b4417f26f559c46b4ab5d2ea935b9bcc0f5a6c08555
hovercard-subject-tagissue:4862558071
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/153568/issue_layout
twitter:imagehttps://opengraph.githubassets.com/120819bdcdaac74f43c52d5756c9bb37e311f4024c66ed33b26e3c45788bcfdc/python/cpython/issues/153568
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/120819bdcdaac74f43c52d5756c9bb37e311f4024c66ed33b26e3c45788bcfdc/python/cpython/issues/153568
og:image:altThis is a catch-all issue to track a series of small, independent speedups to the parser Linked PRs gh-153571 gh-153573 gh-153574 gh-153575 gh-153576 gh-153577 gh-153583 gh-153584 gh-156209 gh-1573...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepablogsal
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/153568#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F153568
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%2Fissues%2F153568
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/153568
Reloadhttps://github.com/python/cpython/issues/153568
Reloadhttps://github.com/python/cpython/issues/153568
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
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/153568
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/153568
Speed up the parserhttps://github.com/python/cpython/issues/153568#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-parserhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-parser%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#issue-4862558071
gh-153568: Skip parser memo lookups that cannot match #153571https://github.com/python/cpython/pull/153571
gh-153568: Make the parser's per-rule stack check an inline comparison #153573https://github.com/python/cpython/pull/153573
gh-153568: Stop re-walking memo lists when growing left-recursive rules #153574https://github.com/python/cpython/pull/153574
gh-153568: Skip the expression precedence chain for single-token atoms #153575https://github.com/python/cpython/pull/153575
gh-153568: Don't materialize parser token text that is never read #153576https://github.com/python/cpython/pull/153576
gh-153568: Cache repeated identifiers while parsing #153577https://github.com/python/cpython/pull/153577
gh-153568: Pause the GC while converting the AST to Python objects #153583https://github.com/python/cpython/pull/153583
gh-153568: Skip newline translation for source without carriage returns #153584https://github.com/python/cpython/pull/153584
gh-153568: Use FIRST sets to speed up parser choices #156209https://github.com/python/cpython/pull/156209
gh-153568: Reduce parser allocations #157374https://github.com/python/cpython/pull/157374
gh-153568: Parse arithmetic with operator loops #157413https://github.com/python/cpython/pull/157413
gh-153568: Factor shared prefixes in expression rules #157437https://github.com/python/cpython/pull/157437
gh-153568: Share expression parsing with assignment targets #157450https://github.com/python/cpython/pull/157450
gh-153568: Reuse shared prefixes in generated parser rules #157465https://github.com/python/cpython/pull/157465
gh-153568: Skip prefix tests when peg_generator is unavailable #157534https://github.com/python/cpython/pull/157534
gh-153568: Skip PEG alternatives that cannot match the next token #160458https://github.com/python/cpython/pull/160458
gh-153568: Use a managed dict for AST nodes #160616https://github.com/python/cpython/pull/160616
Nexthttps://github.com/python/cpython/issues/153568?timeline_page=1
pablogsalhttps://github.com/pablogsal
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
on Jul 11, 2026https://github.com/python/cpython/issues/153568#event-27853378046
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#event-27853399741
pythongh-153568: Skip parser memo lookups that cannot matchhttps://github.com/pablogsal/cpython/commit/a638dad7730bb5c481a4b56343d744dd777b6e30
pythongh-153568https://github.com/python/cpython/issues/153568
a638dadhttps://github.com/pablogsal/cpython/commit/a638dad7730bb5c481a4b56343d744dd777b6e30
https://github.com/StanFromIreland
StanFromIrelandhttps://github.com/StanFromIreland
on Jul 11, 2026https://github.com/python/cpython/issues/153568#issuecomment-4946446454
@pablogsalhttps://github.com/pablogsal
#148931https://github.com/python/cpython/issues/148931
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#issuecomment-4946462304
@pablogsalhttps://github.com/pablogsal
#148931https://github.com/python/cpython/issues/148931
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#event-27854288959
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/f5d126f064b0ffc34d1f45aae74f97927dc0d075
pythongh-153568https://github.com/python/cpython/issues/153568
f5d126fhttps://github.com/pablogsal/cpython/commit/f5d126f064b0ffc34d1f45aae74f97927dc0d075
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/758e3449c6347b4c2c274b73c0dffba983af0a33
pythongh-153568https://github.com/python/cpython/issues/153568
758e344https://github.com/pablogsal/cpython/commit/758e3449c6347b4c2c274b73c0dffba983af0a33
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/f3cc7e43d875f3ee5986959fb1f8a536f9978bfa
pythongh-153568https://github.com/python/cpython/issues/153568
f3cc7e4https://github.com/pablogsal/cpython/commit/f3cc7e43d875f3ee5986959fb1f8a536f9978bfa
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/24e869c6c15a26f9800712509309db39fd098f18
pythongh-153568https://github.com/python/cpython/issues/153568
24e869chttps://github.com/pablogsal/cpython/commit/24e869c6c15a26f9800712509309db39fd098f18
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#event-27854768384
Speed up parser by caching normalized identifiers? #148931https://github.com/python/cpython/issues/148931
pablogsalhttps://github.com/pablogsal
on Jul 11, 2026https://github.com/python/cpython/issues/153568#event-27854774395
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/b3a8d8f7388aeb888fc5bea4dd203dda45a37223
pythongh-153568https://github.com/python/cpython/issues/153568
b3a8d8fhttps://github.com/pablogsal/cpython/commit/b3a8d8f7388aeb888fc5bea4dd203dda45a37223
pythongh-153568: Add fast paths for single-token atoms in the parserhttps://github.com/pablogsal/cpython/commit/605c6d77de2bb9837497a994486bc2d423e1f9a9
pythongh-153568https://github.com/python/cpython/issues/153568
605c6d7https://github.com/pablogsal/cpython/commit/605c6d77de2bb9837497a994486bc2d423e1f9a9
pythongh-153568: Add fast paths for single-token atoms in the parserhttps://github.com/pablogsal/cpython/commit/26282a73a6426d6dba9dea4f6ab06f61ce9042ae
pythongh-153568https://github.com/python/cpython/issues/153568
26282a7https://github.com/pablogsal/cpython/commit/26282a73a6426d6dba9dea4f6ab06f61ce9042ae
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/61277c2276dda28b835708a2085526f825c7c4f5
pythongh-153568https://github.com/python/cpython/issues/153568
61277c2https://github.com/pablogsal/cpython/commit/61277c2276dda28b835708a2085526f825c7c4f5
pablogsalhttps://github.com/pablogsal
on Sep 15, 2026https://github.com/python/cpython/issues/153568#event-31138594738
gh-153568: Reuse shared prefixes in generated parser rules (#157465)https://github.com/python/cpython/commit/89fe9857dd0832de9b597d63ecb11fa7a09984f1
gh-153568https://github.com/python/cpython/issues/153568
#157465https://github.com/python/cpython/pull/157465
89fe985https://github.com/python/cpython/commit/89fe9857dd0832de9b597d63ecb11fa7a09984f1
pythongh-153568: Use FIRST sets to speed up parser choiceshttps://github.com/pablogsal/cpython/commit/456eb6f943d3c876b88723ac8ddf10d5b00a3d0f
pythongh-153568https://github.com/python/cpython/issues/153568
456eb6fhttps://github.com/pablogsal/cpython/commit/456eb6f943d3c876b88723ac8ddf10d5b00a3d0f
pythongh-153568: Fix FIRST-set dispatch typinghttps://github.com/pablogsal/cpython/commit/5646f86b60c9f6c7494f24a28d183927deb840df
pythongh-153568https://github.com/python/cpython/issues/153568
5646f86https://github.com/pablogsal/cpython/commit/5646f86b60c9f6c7494f24a28d183927deb840df
pythongh-153568: Make FIRST-set dispatch conservativehttps://github.com/pablogsal/cpython/commit/306ec7e5af23512b4fb4413f182328e990f1ade2
pythongh-153568https://github.com/python/cpython/issues/153568
306ec7ehttps://github.com/pablogsal/cpython/commit/306ec7e5af23512b4fb4413f182328e990f1ade2
pythongh-153568: Make FIRST-set dispatch conservativehttps://github.com/pablogsal/cpython/commit/6409262a0c01f27476c8508db1e4d786b8d2e72c
pythongh-153568https://github.com/python/cpython/issues/153568
6409262https://github.com/pablogsal/cpython/commit/6409262a0c01f27476c8508db1e4d786b8d2e72c
gh-153568: Skip prefix tests when peg_generator is unavailable (#157534)https://github.com/python/cpython/commit/e03ed46e8016fd73657afca61d08cc9688637aad
gh-153568https://github.com/python/cpython/issues/153568
#157534https://github.com/python/cpython/pull/157534
e03ed46https://github.com/python/cpython/commit/e03ed46e8016fd73657afca61d08cc9688637aad
https://github.com/eendebakpt
eendebakpthttps://github.com/eendebakpt
on Sep 15, 2026https://github.com/python/cpython/issues/153568#issuecomment-5678689975
https://discuss.python.org/t/faster-lazier-dataclasses/107744https://discuss.python.org/t/faster-lazier-dataclasses/107744
a53b5b1https://github.com/python/cpython/commit/a53b5b126749133e50692fe0c3729f5580ee8500
2fcb0e2https://github.com/python/cpython/commit/2fcb0e27d959345151750b756af79054c3230531
pablogsalhttps://github.com/pablogsal
on Sep 16, 2026https://github.com/python/cpython/issues/153568#event-31273111199
gh-153568: Reduce parser allocations (#157374)https://github.com/python/cpython/commit/d8a1072491069b825edcfef66a06761e074da18a
gh-153568https://github.com/python/cpython/issues/153568
#157374https://github.com/python/cpython/pull/157374
d8a1072https://github.com/python/cpython/commit/d8a1072491069b825edcfef66a06761e074da18a
pablogsalhttps://github.com/pablogsal
on Oct 23, 2026https://github.com/python/cpython/issues/153568#event-34082931206
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/5eb058a6fb88fbc6e95bb08a076bac4b6bdf0783
pythongh-153568https://github.com/python/cpython/issues/153568
5eb058ahttps://github.com/pablogsal/cpython/commit/5eb058a6fb88fbc6e95bb08a076bac4b6bdf0783
pythongh-153568: Parse rule flags in the Rule constructorhttps://github.com/pablogsal/cpython/commit/0136cf5f7774c1d6fde861466953a674b5777341
pythongh-153568https://github.com/python/cpython/issues/153568
0136cf5https://github.com/pablogsal/cpython/commit/0136cf5f7774c1d6fde861466953a674b5777341
pythongh-153568: Skip the expression precedence chain for single-toke…https://github.com/pablogsal/cpython/commit/86b00a519cb87ca133ca657a448e37ed6e0a12d3
pythongh-153568https://github.com/python/cpython/issues/153568
86b00a5https://github.com/pablogsal/cpython/commit/86b00a519cb87ca133ca657a448e37ed6e0a12d3
pythongh-153568: Parse rule flags in the Rule constructorhttps://github.com/pablogsal/cpython/commit/a431447a52cfcfa88776466676f5c9008e2277ea
pythongh-153568https://github.com/python/cpython/issues/153568
a431447https://github.com/pablogsal/cpython/commit/a431447a52cfcfa88776466676f5c9008e2277ea
gh-153568: Skip the expression precedence chain for single-token atoms (https://github.com/python/cpython/commit/b77cb891e95b6121a87d728ceb2dcbb5a0e9ef93
gh-153568https://github.com/python/cpython/issues/153568
b77cb89https://github.com/python/cpython/commit/b77cb891e95b6121a87d728ceb2dcbb5a0e9ef93
lysnikolaouhttps://github.com/lysnikolaou
on Oct 25, 2026https://github.com/python/cpython/issues/153568#event-34193394268
gh-153568: Use a managed dict for AST nodes (#160616)https://github.com/python/cpython/commit/aa0e4109a8681cbe6fb65e4072b0058e02adaef9
gh-153568https://github.com/python/cpython/issues/153568
#160616https://github.com/python/cpython/pull/160616
aa0e410https://github.com/python/cpython/commit/aa0e4109a8681cbe6fb65e4072b0058e02adaef9
cmaloneyhttps://github.com/cmaloney
on Nov 1, 2026https://github.com/python/cpython/issues/153568#event-34861785833
Speed up UTF-8 validation in tokenizer and ASCII scanning in UTF-8 decoding #161145https://github.com/python/cpython/issues/161145
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/153568
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/153568
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-parserhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-parser%22
type-featureA feature request or enhancementhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-feature%22
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.