René's URL Explorer Experiment


Title: Potentially serious regression in garbage collector performance in Python 3.14 · Issue #139951 · python/cpython · GitHub

Open Graph Title: Potentially serious regression in garbage collector performance in Python 3.14 · Issue #139951 · python/cpython

X Title: Potentially serious regression in garbage collector performance in Python 3.14 · Issue #139951 · python/cpython

Description: Bug report Bug description: The following code, consisting of a bunch of dict lookups and writes, runs in < 1 second on Python 3.13 > 2 seconds on Python 3.14 n = 1000 d = {} for i in range(n): d[(i, i)] = d[(i, 0)] = d[(0, i)] = 0 for i...

Open Graph Description: Bug report Bug description: The following code, consisting of a bunch of dict lookups and writes, runs in < 1 second on Python 3.13 > 2 seconds on Python 3.14 n = 1000 d = {} for i in range(n): d[(...

X Description: Bug report Bug description: The following code, consisting of a bunch of dict lookups and writes, runs in < 1 second on Python 3.13 > 2 seconds on Python 3.14 n = 1000 d = {} for i in range(n...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Potentially serious regression in garbage collector performance in Python 3.14","articleBody":"# Bug report\n\n### Bug description:\n\nThe following code, consisting of a bunch of `dict` lookups and writes, runs in\n\n* _\u003c 1 second_ on Python 3.13\n* _\u003e 2 seconds_ on Python 3.14\n \n```python\nn = 1000\nd = {}\nfor i in range(n):\n    d[(i, i)] = d[(i, 0)] = d[(0, i)] = 0\nfor i in range(1, n):\n    for j in range(1, n):\n        d[(i, j)] = i + j + d[(i - 1, j)] + d[(i, j - 1)] + d[(i - 1, j - 1)]\nprint(d[(n - 1, n - 1)])\n```\n\nTests are run on a Dell Precision 5490, running Ubuntu:\n\n```\nLinux precision 6.14.0-33-generic #33-Ubuntu SMP PREEMPT_DYNAMIC Wed Sep 17 23:22:02 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux\n\nUbuntu 25.04 (Plucky)\n```\n\nThe cpython is from [python-build-standalone](https://github.com/astral-sh/python-build-standalone)\n\n* `cpython-3.14.0+20251010-x86_64-unknown-linux-gnu-install_only.tar.gz`\n* `cpython-3.13.8+20251010-x86_64-unknown-linux-gnu-install_only.tar.gz`\n\n\n## Log\n\n```\n[~/regression-testing]$ hyperfine --warmup=10 \"cp313/python/bin/python3.13 dicttest.py\" \"cp314/python/bin/python3.14 dicttest.py\"\nBenchmark 1: cp313/python/bin/python3.13 dicttest.py\n  Time (mean ± σ):     880.8 ms ± 119.7 ms    [User: 730.1 ms, System: 150.1 ms]\n  Range (min … max):   713.3 ms … 1066.2 ms    10 runs\n \nBenchmark 2: cp314/python/bin/python3.14 dicttest.py\n  Time (mean ± σ):      2.235 s ±  0.035 s    [User: 2.066 s, System: 0.168 s]\n  Range (min … max):    2.168 s …  2.295 s    10 runs\n \nSummary\n  cp313/python/bin/python3.13 dicttest.py ran\n    2.54 ± 0.35 times faster than cp314/python/bin/python3.14 dicttest.py\n```\n\nIt seems to scale very poorly too.  With the same code, but `n = 2000` (instead of `n = 1000`), leads to 3.3 sec (Python 3.13) vs 20 seconds (Python 3.14)!  I.e., Python 3.13 being 5 times faster.\n\n```\n[~/regression-testing]$ hyperfine --warmup=10 \"cp313/python/bin/python3.13 dicttest.py\" \"cp314/python/bin/python3.14 dicttest.py\"\nBenchmark 1: cp313/python/bin/python3.13 dicttest.py\n  Time (mean ± σ):      3.458 s ±  0.048 s    [User: 2.889 s, System: 0.568 s]\n  Range (min … max):    3.375 s …  3.521 s    10 runs\n \nBenchmark 2: cp314/python/bin/python3.14 dicttest.py\n  Time (mean ± σ):     20.084 s ±  0.230 s    [User: 19.503 s, System: 0.577 s]\n  Range (min … max):   19.749 s … 20.345 s    10 runs\n \nSummary\n  cp313/python/bin/python3.13 dicttest.py ran\n    5.81 ± 0.10 times faster than cp314/python/bin/python3.14 dicttest.py\n```\n\n\u003cimg width=\"1920\" height=\"1054\" alt=\"Time comparison plot of Python 3.13 vs Python 3.14\" src=\"https://github.com/user-attachments/assets/b06f1b4c-3ac5-4ec2-9a0a-0f6fe226c67a\" /\u003e\n\nPlotting time (in seconds) of the script run with `n = 0 ... 2000`.\n\n### CPython versions tested on:\n\n3.14\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-140204\n* gh-140262\n* gh-140304\n* gh-140362\n* gh-140363\n* gh-140423\n* gh-140447\n* gh-140575\n* gh-140701\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/pgdr","@type":"Person","name":"pgdr"},"datePublished":"2025-10-11T10:11:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":31},"url":"https://github.com/139951/cpython/issues/139951"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1ab8bdfb-4f41-62ea-261c-32a5c1548652
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCA04:144C84:BAB0B6:105C3C5:696A29D5
html-safe-nonceac5253904ad6d59376baf6e3a2e7a5eebe1e634095d3d5bc8a98e0d7ae1ad913
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTA0OjE0NEM4NDpCQUIwQjY6MTA1QzNDNTo2OTZBMjlENSIsInZpc2l0b3JfaWQiOiI3ODY0MzYwMDkzMTQwNzg5NzE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac049fb0dbbce685e7c1df4e6d96a829361f20d41a2b36aff94ffa2a723a7c1a6c
hovercard-subject-tagissue:3505571273
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/139951/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8903d2334b8713a266b61865a1dbffa564de609622375c3f1459874a81eedf06/python/cpython/issues/139951
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8903d2334b8713a266b61865a1dbffa564de609622375c3f1459874a81eedf06/python/cpython/issues/139951
og:image:altBug report Bug description: The following code, consisting of a bunch of dict lookups and writes, runs in < 1 second on Python 3.13 > 2 seconds on Python 3.14 n = 1000 d = {} for i in range(n): d[(...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepgdr
hostnamegithub.com
expected-hostnamegithub.com
Nonea1022f03e4f0d91ea173e4e5dac892c982e0588c62f1ce56121d755a320a3569
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
releasef472b8e6c7b3fdd5d0354972a3f4c516289bf0be
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/139951#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F139951
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2Fissues%2F139951
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%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/139951
Reloadhttps://github.com/python/cpython/issues/139951
Reloadhttps://github.com/python/cpython/issues/139951
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/139951
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/issues/139951
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 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139951
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/139951
Potentially serious regression in garbage collector performance in Python 3.14https://github.com/python/cpython/issues/139951#top
https://github.com/markshannon
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
3.15new features, bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
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
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/pgdr
https://github.com/pgdr
pgdrhttps://github.com/pgdr
on Oct 11, 2025https://github.com/python/cpython/issues/139951#issue-3505571273
python-build-standalonehttps://github.com/astral-sh/python-build-standalone
https://private-user-images.githubusercontent.com/17569537/500135503-b06f1b4c-3ac5-4ec2-9a0a-0f6fe226c67a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg1NjU1MDUsIm5iZiI6MTc2ODU2NTIwNSwicGF0aCI6Ii8xNzU2OTUzNy81MDAxMzU1MDMtYjA2ZjFiNGMtM2FjNS00ZWMyLTlhMGEtMGY2ZmUyMjZjNjdhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTE2VDEyMDY0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTExNjc4ZjA0MjdlYTIwMTZjZTNlYWYxOTk0OWI2YjQzYmYxYWYzZDFmYmRlZDY2NzYyOWMyOTM0NWExMjUyMTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.6XHmvMJvWKn8GqxoW0WxQ1Yy77Odsf3rYfx6eVSsW-A
gh-139951: Do not track immutable tuples in GC #140204https://github.com/python/cpython/pull/140204
GH-139951: Fix major GC performance regression #140262https://github.com/python/cpython/pull/140262
gh-139951: Test on GC collection disabled if threshold is zero #140304https://github.com/python/cpython/pull/140304
[3.14] gh-139951: Test on GC collection disabled if threshold is zero (GH-140304) #140362https://github.com/python/cpython/pull/140362
[3.13] gh-139951: Test on GC collection disabled if threshold is zero (GH-140304) #140363https://github.com/python/cpython/pull/140363
[3.14] GH-139951: Fix major GC performance regression (GH-140262) #140423https://github.com/python/cpython/pull/140423
[3.14] GH-139951: Fix major GC performance regression. Backport of GH-140262 #140447https://github.com/python/cpython/pull/140447
gh-139951: Tests on tuple tracking #140575https://github.com/python/cpython/pull/140575
[3.14] gh-139951: Tests on tuple tracking (GH-140575) #140701https://github.com/python/cpython/pull/140701
markshannonhttps://github.com/markshannon
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
3.15new features, bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.15%22
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
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%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.