René's URL Explorer Experiment


Title: gh-146558: optimize dict access with objects with known hash by kumaraditya303 · Pull Request #146559 · python/cpython · GitHub

Open Graph Title: gh-146558: optimize dict access with objects with known hash by kumaraditya303 · Pull Request #146559 · python/cpython

X Title: gh-146558: optimize dict access with objects with known hash by kumaraditya303 · Pull Request #146559 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: I asked Claude to create a benchmark for this, it created the following script which shows a real significant speedup. Benchmark No JIT JIT Speedup dict_get[str] 55.7M/s 70.1M/s +26% dict_...

X Description: I asked Claude to create a benchmark for this, it created the following script which shows a real significant speedup. Benchmark No JIT JIT Speedup dict_get[str] 55.7M/s 70.1M/s +26% dict_...

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

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:20a7d662-c08b-e7e9-20be-942c70c1e670
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE5CA:2371E7:518A725:72821F1:6A5107AA
html-safe-nonce9ff7bf757703eade04e32e3e1488c38736cb4f4177fce459dd83c25a67be4e6c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUNBOjIzNzFFNzo1MThBNzI1OjcyODIxRjE6NkE1MTA3QUEiLCJ2aXNpdG9yX2lkIjoiNTc0NjAwODk5MzU3NjMyMjk4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac475be98a8d96543c9b92e42d91a51bc05312dc838f482ec9c21c769adb4b01f6
hovercard-subject-tagpull_request:3460355401
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/146559/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/1a39ecfbaeeb0aeae897135b37b97896c5f7bc2fb217590c681386e3c0f94db4/python/cpython/pull/146559
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1a39ecfbaeeb0aeae897135b37b97896c5f7bc2fb217590c681386e3c0f94db4/python/cpython/pull/146559
og:image:altI asked Claude to create a benchmark for this, it created the following script which shows a real significant speedup. Benchmark No JIT JIT Speedup dict_get[str] 55.7M/s 70.1M/s +26% dict_...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekumaraditya303
hostnamegithub.com
expected-hostnamegithub.com
Noneb076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d
turbo-cache-controlno-cache
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
release2d129404fc45ea64edb1b98567c53e55b395536f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/146559#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146559
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146559
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/146559
Reloadhttps://github.com/python/cpython/pull/146559
Reloadhttps://github.com/python/cpython/pull/146559
Please reload this pagehttps://github.com/python/cpython/pull/146559
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/146559
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.7k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
kumaraditya303https://github.com/kumaraditya303
python:mainhttps://github.com/python/cpython/tree/main
kumaraditya303:jit-hashhttps://github.com/kumaraditya303/cpython/tree/jit-hash
Conversationhttps://github.com/python/cpython/pull/146559
Commits8 (8)https://github.com/python/cpython/pull/146559/commits
Checkshttps://github.com/python/cpython/pull/146559/checks
Files changedhttps://github.com/python/cpython/pull/146559/files
gh-146558: optimize dict access with objects with known hashhttps://github.com/python/cpython/pull/146559#top
kumaraditya303https://github.com/kumaraditya303
python:mainhttps://github.com/python/cpython/tree/main
kumaraditya303:jit-hashhttps://github.com/kumaraditya303/cpython/tree/jit-hash
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Mar 28, 2026https://github.com/python/cpython/pull/146559#issue-4158854777
Please reload this pagehttps://github.com/python/cpython/pull/146559
JIT optimize dict access with consts with known hash #146558https://github.com/python/cpython/issues/146558
Please reload this pagehttps://github.com/python/cpython/pull/146559
https://github.com/kumaraditya303
optimize dict access with objects with safe hashhttps://github.com/python/cpython/pull/146559/commits/b441e1baab9d1533f809868634e8be5ddf910130
b441e1bhttps://github.com/python/cpython/pull/146559/commits/b441e1baab9d1533f809868634e8be5ddf910130
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
Fidget-Spinnerhttps://github.com/Fidget-Spinner
markshannonhttps://github.com/markshannon
methanehttps://github.com/methane
savannahostrowskihttps://github.com/savannahostrowski
tomasr8https://github.com/tomasr8
code ownershttps://github.com/python/cpython/blob/1efe441de7c448852b9ba51fb0db4d355a7157a8/.github/CODEOWNERS#L308
March 28, 2026 09:16https://github.com/python/cpython/pull/146559#event-23996412310
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Mar 28, 2026https://github.com/python/cpython/pull/146559#event-23996413487
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Mar 28, 2026 https://github.com/python/cpython/pull/146559#ref-issue-4158838506
JIT optimize dict access with consts with known hash #146558 https://github.com/python/cpython/issues/146558
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
Mar 28, 2026https://github.com/python/cpython/pull/146559#event-23996425094
kumaraditya303https://github.com/kumaraditya303
March 28, 2026 14:53https://github.com/python/cpython/pull/146559#commits-pushed-a5b4476
https://github.com/kumaraditya303
fix build on windowshttps://github.com/python/cpython/pull/146559/commits/a5b447611658ae1d4dc2d8b583fb09c005a45491
a5b4476https://github.com/python/cpython/pull/146559/commits/a5b447611658ae1d4dc2d8b583fb09c005a45491
https://github.com/kumaraditya303
remove benchmarkhttps://github.com/python/cpython/pull/146559/commits/3263498d05194b97e69faf54c26168ecc28d73fe
3263498https://github.com/python/cpython/pull/146559/commits/3263498d05194b97e69faf54c26168ecc28d73fe
https://github.com/kumaraditya303
improve commentshttps://github.com/python/cpython/pull/146559/commits/3af5968873a764f6c2db788dbe3c9fba91f5685b
3af5968https://github.com/python/cpython/pull/146559/commits/3af5968873a764f6c2db788dbe3c9fba91f5685b
https://github.com/kumaraditya303
run regenhttps://github.com/python/cpython/pull/146559/commits/7707961c9bd8f40298c04501685fbc5bdcf5ef72
7707961https://github.com/python/cpython/pull/146559/commits/7707961c9bd8f40298c04501685fbc5bdcf5ef72
https://github.com/kumaraditya303
fix test warninghttps://github.com/python/cpython/pull/146559/commits/2d1a169afd0e921c99a5e1a2d6a6fa8e5badaf5d
2d1a169https://github.com/python/cpython/pull/146559/commits/2d1a169afd0e921c99a5e1a2d6a6fa8e5badaf5d
https://github.com/kumaraditya303
optimize floats and complex as wellhttps://github.com/python/cpython/pull/146559/commits/ea4ae79c95190a8957fcb71488d50f986beb8392
ea4ae79https://github.com/python/cpython/pull/146559/commits/ea4ae79c95190a8957fcb71488d50f986beb8392
https://github.com/Fidget-Spinner
Fidget-Spinnerhttps://github.com/Fidget-Spinner
Mar 30, 2026 https://github.com/python/cpython/pull/146559#pullrequestreview-4030460295
View reviewed changes https://github.com/python/cpython/pull/146559/files/ea4ae79c95190a8957fcb71488d50f986beb8392
Python/optimizer_bytecodes.chttps://github.com/python/cpython/pull/146559/files/ea4ae79c95190a8957fcb71488d50f986beb8392#diff-e5bd2b14b0b10f0f47786e26306d689ed1361c3dc3b11dcc3ea52b8a2422ff64
Please reload this pagehttps://github.com/python/cpython/pull/146559
https://github.com/kumaraditya303
refactor common code to optimize_dict_known_hashhttps://github.com/python/cpython/pull/146559/commits/7a4d046116c1c1f76e68afbecf8e28dc1c98d437
7a4d046https://github.com/python/cpython/pull/146559/commits/7a4d046116c1c1f76e68afbecf8e28dc1c98d437
https://github.com/Fidget-Spinner
Fidget-Spinnerhttps://github.com/Fidget-Spinner
Mar 30, 2026 https://github.com/python/cpython/pull/146559#pullrequestreview-4030641833
View reviewed changes https://github.com/python/cpython/pull/146559/files/7a4d046116c1c1f76e68afbecf8e28dc1c98d437
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting core review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20core%20review%22
Mar 30, 2026https://github.com/python/cpython/pull/146559#event-24036603046
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 30, 2026 13:41https://github.com/python/cpython/pull/146559#event-24036650038
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 30, 2026 13:41https://github.com/python/cpython/pull/146559#event-24036653606
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 30, 2026 13:41https://github.com/python/cpython/pull/146559#event-24036661841
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
8e9d21chttps://github.com/python/cpython/commit/8e9d21c64b65edda99a0d38e8d23545b17f8455e
Mar 30, 2026https://github.com/python/cpython/pull/146559#event-24038236789
Please reload this pagehttps://github.com/python/cpython/pull/146559
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
March 30, 2026 14:23https://github.com/python/cpython/pull/146559#event-24038244097
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Mar 30, 2026https://github.com/python/cpython/pull/146559#event-24038245827
maurycyhttps://github.com/maurycy
Mar 30, 2026 https://github.com/python/cpython/pull/146559#ref-commit-6a0ea81
https://github.com/maurycy
Merge remote-tracking branch 'upstream/main' into tachyon-ndjson-kole…https://github.com/maurycy/cpython/commit/6a0ea81b65c2e41d22addc23ddd64da0782855db
6a0ea81https://github.com/maurycy/cpython/commit/6a0ea81b65c2e41d22addc23ddd64da0782855db
pythongh-144270https://github.com/python/cpython/issues/144270
pythonGH-144845https://github.com/python/cpython/pull/144845
pythongh-146558https://github.com/python/cpython/issues/146558
python#146559https://github.com/python/cpython/pull/146559
pythongh-139922https://github.com/python/cpython/issues/139922
pythonGH-146570https://github.com/python/cpython/pull/146570
pythongh-126835https://github.com/python/cpython/issues/126835
python#146631https://github.com/python/cpython/pull/146631
pythongh-146587https://github.com/python/cpython/issues/146587
python#146593https://github.com/python/cpython/pull/146593
pythongh-138122https://github.com/python/cpython/issues/138122
python#145785https://github.com/python/cpython/pull/145785
pythongh-146416https://github.com/python/cpython/issues/146416
python#146417https://github.com/python/cpython/pull/146417
pythongh-146444https://github.com/python/cpython/issues/146444
python#146628https://github.com/python/cpython/pull/146628
pythongh-138850https://github.com/python/cpython/issues/138850
pythonGH-145768https://github.com/python/cpython/pull/145768
pythongh-146444https://github.com/python/cpython/issues/146444
python#146624https://github.com/python/cpython/pull/146624
pythongh-138577https://github.com/python/cpython/issues/138577
python#141597https://github.com/python/cpython/pull/141597
pythongh-146556https://github.com/python/cpython/issues/146556
python#146557https://github.com/python/cpython/pull/146557
pythongh-146579https://github.com/python/cpython/issues/146579
python#146577https://github.com/python/cpython/pull/146577
pythongh-146083https://github.com/python/cpython/issues/146083
python#146085https://github.com/python/cpython/pull/146085
pythongh-146080https://github.com/python/cpython/issues/146080
python#146573https://github.com/python/cpython/pull/146573
pythongh-146090https://github.com/python/cpython/issues/146090
python#146569https://github.com/python/cpython/pull/146569
pythongh-145876https://github.com/python/cpython/issues/145876
pythonGH-146472https://github.com/python/cpython/pull/146472
pythongh-146004https://github.com/python/cpython/issues/146004
python#146580https://github.com/python/cpython/pull/146580
pythongh-139003https://github.com/python/cpython/issues/139003
python#139004https://github.com/python/cpython/pull/139004
pythonGH-146527https://github.com/python/cpython/issues/146527
python#146532https://github.com/python/cpython/pull/146532
https://github.com/kumaraditya303
kumaraditya303https://github.com/kumaraditya303
topic-JIT https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atopic-JIT
Mar 31, 2026https://github.com/python/cpython/pull/146559#event-24061227958
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Apr 4, 2026 https://github.com/python/cpython/pull/146559#ref-pullrequest-3716338400
gh-130273: Fix traceback color output with unicode characters #142529 https://github.com/python/cpython/pull/142529
https://github.com/Siyet
Siyethttps://github.com/Siyet
Apr 12, 2026 https://github.com/python/cpython/pull/146559#ref-issue-3983908276
General optimisations for dict lookup/insert performance #145179 https://github.com/python/cpython/issues/145179
clin1234https://github.com/clin1234
Apr 16, 2026 https://github.com/python/cpython/pull/146559#ref-commit-96c37e7
https://github.com/kumaraditya303
https://github.com/clin1234
pythongh-146558https://github.com/python/cpython/issues/146558
: JIT optimize dict access for objects with known hash (https://github.com/clin1234/cpython/commit/96c37e7fc0330bb741384bd47c2dbecffd73b589
https://github.com/python/cpython/pull/146559
96c37e7https://github.com/clin1234/cpython/commit/96c37e7fc0330bb741384bd47c2dbecffd73b589
…python#146559https://github.com/python/cpython/pull/146559
ljfphttps://github.com/ljfp
Apr 25, 2026 https://github.com/python/cpython/pull/146559#ref-commit-c8eb289
https://github.com/kumaraditya303
https://github.com/ljfp
pythongh-146558https://github.com/python/cpython/issues/146558
: JIT optimize dict access for objects with known hash (https://github.com/ljfp/cpython/commit/c8eb289ca505f63181e60ab4135bc5f49f22e789
https://github.com/python/cpython/pull/146559
c8eb289https://github.com/ljfp/cpython/commit/c8eb289ca505f63181e60ab4135bc5f49f22e789
…python#146559https://github.com/python/cpython/pull/146559
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F146559
https://github.com/Fidget-Spinner
Fidget-Spinner https://github.com/Fidget-Spinner
https://github.com/python/cpython/pull/146559/files/7a4d046116c1c1f76e68afbecf8e28dc1c98d437
https://github.com/markshannon
markshannon https://github.com/markshannon
https://github.com/tomasr8
tomasr8 https://github.com/tomasr8
https://github.com/savannahostrowski
savannahostrowski https://github.com/savannahostrowski
https://github.com/methane
methane https://github.com/methane
skip news https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22skip%20news%22
topic-JIT https://github.com/python/cpython/issues?q=state%3Aopen%20label%3Atopic-JIT
Please reload this pagehttps://github.com/python/cpython/pull/146559
https://github.com/kumaraditya303
https://github.com/Fidget-Spinner
https://github.com/savannahostrowski
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.