René's URL Explorer Experiment


Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython · GitHub

Open Graph Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython

X Title: GH-99298: Clean up attribute specializations by brandtbucher · Pull Request #99398 · python/cpython

Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for LOAD_ATTR. Probably worth backporting this part manually? No performance impact: Details All benchmarks: =============== Slower (20): - mdp: 2.51 sec +- 0.02 sec -> 2.61 sec +- 0.01 sec: 1.04x slower - pickle_list: 4.03 us +- 0.03 us -> 4.17 us +- 0.04 us: 1.04x slower - scimark_sparse_mat_mult: 4.07 ms +- 0.07 ms -> 4.18 ms +- 0.06 ms: 1.03x slower - pathlib: 17.3 ms +- 0.2 ms -> 17.7 ms +- 0.4 ms: 1.02x slower - regex_effbot: 3.34 ms +- 0.02 ms -> 3.42 ms +- 0.03 ms: 1.02x slower - telco: 6.25 ms +- 0.22 ms -> 6.39 ms +- 0.19 ms: 1.02x slower - mako: 9.52 ms +- 0.06 ms -> 9.72 ms +- 0.05 ms: 1.02x slower - regex_dna: 202 ms +- 1 ms -> 206 ms +- 1 ms: 1.02x slower - django_template: 32.6 ms +- 0.5 ms -> 33.3 ms +- 0.3 ms: 1.02x slower - float: 71.5 ms +- 0.8 ms -> 72.9 ms +- 1.1 ms: 1.02x slower - fannkuch: 374 ms +- 11 ms -> 381 ms +- 15 ms: 1.02x slower - deltablue: 3.19 ms +- 0.04 ms -> 3.25 ms +- 0.04 ms: 1.02x slower - scimark_lu: 106 ms +- 2 ms -> 107 ms +- 4 ms: 1.01x slower - coverage: 98.1 ms +- 1.2 ms -> 99.4 ms +- 1.2 ms: 1.01x slower - nqueens: 81.1 ms +- 1.4 ms -> 82.2 ms +- 1.1 ms: 1.01x slower - hexiom: 6.06 ms +- 0.02 ms -> 6.14 ms +- 0.03 ms: 1.01x slower - xml_etree_iterparse: 104 ms +- 2 ms -> 106 ms +- 2 ms: 1.01x slower - richards: 41.7 ms +- 0.7 ms -> 42.1 ms +- 0.9 ms: 1.01x slower - scimark_fft: 311 ms +- 3 ms -> 313 ms +- 4 ms: 1.01x slower - crypto_pyaes: 74.1 ms +- 0.7 ms -> 74.4 ms +- 0.8 ms: 1.00x slower Faster (28): - unpack_sequence: 46.1 ns +- 4.1 ns -> 42.5 ns +- 0.8 ns: 1.08x faster - pidigits: 199 ms +- 0 ms -> 189 ms +- 0 ms: 1.05x faster - coroutines: 25.5 ms +- 0.2 ms -> 24.6 ms +- 0.2 ms: 1.04x faster - genshi_text: 21.1 ms +- 0.2 ms -> 20.4 ms +- 0.3 ms: 1.03x faster - pycparser: 1.08 sec +- 0.02 sec -> 1.05 sec +- 0.02 sec: 1.03x faster - logging_format: 6.34 us +- 0.10 us -> 6.23 us +- 0.07 us: 1.02x faster - logging_simple: 5.75 us +- 0.08 us -> 5.66 us +- 0.06 us: 1.02x faster - deepcopy_reduce: 2.94 us +- 0.04 us -> 2.89 us +- 0.04 us: 1.02x faster - unpickle_pure_python: 204 us +- 2 us -> 201 us +- 1 us: 1.01x faster - spectral_norm: 95.9 ms +- 3.8 ms -> 94.6 ms +- 2.6 ms: 1.01x faster - pickle: 10.3 us +- 0.1 us -> 10.2 us +- 0.1 us: 1.01x faster - pickle_dict: 31.3 us +- 0.1 us -> 31.0 us +- 0.1 us: 1.01x faster - sympy_sum: 163 ms +- 1 ms -> 162 ms +- 1 ms: 1.01x faster - sympy_str: 283 ms +- 4 ms -> 280 ms +- 4 ms: 1.01x faster - regex_v8: 21.2 ms +- 0.1 ms -> 21.0 ms +- 0.1 ms: 1.01x faster - generators: 78.7 ms +- 0.5 ms -> 78.0 ms +- 0.4 ms: 1.01x faster - json_loads: 24.2 us +- 0.4 us -> 24.0 us +- 0.2 us: 1.01x faster - json_dumps: 9.45 ms +- 0.18 ms -> 9.36 ms +- 0.13 ms: 1.01x faster - sympy_expand: 457 ms +- 3 ms -> 453 ms +- 7 ms: 1.01x faster - sympy_integrate: 20.3 ms +- 0.1 ms -> 20.2 ms +- 0.1 ms: 1.01x faster - sqlglot_transpile: 1.63 ms +- 0.02 ms -> 1.61 ms +- 0.02 ms: 1.01x faster - xml_etree_process: 53.2 ms +- 0.7 ms -> 52.8 ms +- 0.6 ms: 1.01x faster - python_startup_no_site: 6.27 ms +- 0.01 ms -> 6.22 ms +- 0.01 ms: 1.01x faster - genshi_xml: 46.9 ms +- 0.9 ms -> 46.6 ms +- 0.8 ms: 1.01x faster - sqlglot_normalize: 106 ms +- 1 ms -> 105 ms +- 1 ms: 1.01x faster - python_startup: 8.60 ms +- 0.01 ms -> 8.55 ms +- 0.01 ms: 1.01x faster - 2to3: 246 ms +- 1 ms -> 245 ms +- 1 ms: 1.01x faster - sqlglot_optimize: 50.9 ms +- 0.2 ms -> 50.7 ms +- 0.3 ms: 1.01x faster Benchmark hidden because not significant (34): aiohttp, async_tree_none, async_tree_cpu_io_mixed, async_tree_io, async_tree_memoization, chameleon, chaos, deepcopy, deepcopy_memo, dulwich_log, go, gunicorn, html5lib, json, logging_silent, meteor_contest, mypy, nbody, pickle_pure_python, pprint_safe_repr, pprint_pformat, pyflate, raytrace, regex_compile, scimark_monte_carlo, scimark_sor, sqlglot_parse, sqlite_synth, thrift, tornado_http, unpickle, unpickle_list, xml_etree_parse, xml_etree_generate Geometric mean: 1.00x faster Issue: gh-99298

Open Graph Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for L...

X Description: It's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we alre...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b81aa590-8ae5-428f-e806-9b87114347fa
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9A04:1EFC6:22A281E:2F2FC96:696ACF09
html-safe-nonceb8183ac8f2cfc08e274906bae5949ca88eee9efbfd3fd3c0a244c2a5c0f423c3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTA0OjFFRkM2OjIyQTI4MUU6MkYyRkM5Njo2OTZBQ0YwOSIsInZpc2l0b3JfaWQiOiIzMzQ1NzI0OTUyMjM1NzQyODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd10c60362870ed17f166d83aaad2ff5a7c9de9ad922d3e6b81f0243ff3318d47
hovercard-subject-tagpull_request:1119560571
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/99398/files
twitter:imagehttps://avatars.githubusercontent.com/u/40968415?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40968415?s=400&v=4
og:image:altIt's now impossible for specialization to raise exceptions. Also, add an overly-cautious-but-inexpensive check for "unready" types when specializing STORE_ATTR, as we already do for L...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d
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
releasec718a376fcf780eb22089171adb84a543f660bf7
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/99398/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F99398%2Ffiles
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%2Fpull%2F99398%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/99398/files
Reloadhttps://github.com/python/cpython/pull/99398/files
Reloadhttps://github.com/python/cpython/pull/99398/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/99398/files
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/pull/99398/files
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
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
brandtbucherhttps://github.com/brandtbucher
python:mainhttps://github.com/python/cpython/tree/main
brandtbucher:void-attr-specializationshttps://github.com/brandtbucher/cpython/tree/void-attr-specializations
Conversation 0 https://github.com/python/cpython/pull/99398
Commits 2 https://github.com/python/cpython/pull/99398/commits
Checks 0 https://github.com/python/cpython/pull/99398/checks
Files changed https://github.com/python/cpython/pull/99398/files
Please reload this pagehttps://github.com/python/cpython/pull/99398/files
GH-99298: Clean up attribute specializations https://github.com/python/cpython/pull/99398/files#top
Show all changes 2 commits https://github.com/python/cpython/pull/99398/files
f80d941 Don't raise when specializing brandtbucher Nov 10, 2022 https://github.com/python/cpython/pull/99398/commits/f80d94151df82c8907bf1ba8a07901c5006c4548
47e4303 blurb add brandtbucher Nov 11, 2022 https://github.com/python/cpython/pull/99398/commits/47e430368704b9d3ad4928b1596797528cfaf9b4
Clear filters https://github.com/python/cpython/pull/99398/files
Please reload this pagehttps://github.com/python/cpython/pull/99398/files
Please reload this pagehttps://github.com/python/cpython/pull/99398/files
pycore_code.h https://github.com/python/cpython/pull/99398/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
2022-11-10-16-53-40.gh-issue-99298.HqRJES.rst https://github.com/python/cpython/pull/99398/files#diff-5a0b05086818c535232e9238ba0a848ad907adf5b3ec73a3163698c53e4c1377
bytecodes.c https://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
generated_cases.c.h https://github.com/python/cpython/pull/99398/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
specialize.c https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
Include/internal/pycore_code.hhttps://github.com/python/cpython/pull/99398/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
View file https://github.com/brandtbucher/cpython/blob/47e430368704b9d3ad4928b1596797528cfaf9b4/Include/internal/pycore_code.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99398/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99398/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
https://github.com/python/cpython/pull/99398/files#diff-97ea1759f82531a45fa685065ff86bc1077c3ab3d5f65220eea48b7730032bc8
Misc/NEWS.d/next/Core and Builtins/2022-11-10-16-53-40.gh-issue-99298.HqRJES.rsthttps://github.com/python/cpython/pull/99398/files#diff-5a0b05086818c535232e9238ba0a848ad907adf5b3ec73a3163698c53e4c1377
View file https://github.com/brandtbucher/cpython/blob/47e430368704b9d3ad4928b1596797528cfaf9b4/Misc/NEWS.d/next/Core%20and%20Builtins/2022-11-10-16-53-40.gh-issue-99298.HqRJES.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99398/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L221
Python/bytecodes.chttps://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
View file https://github.com/brandtbucher/cpython/blob/47e430368704b9d3ad4928b1596797528cfaf9b4/Python/bytecodes.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99398/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
https://github.com/python/cpython/pull/99398/files#diff-729a985b0cb8b431cb291f1edb561bbbfea22e3f8c262451cd83328a0936a342
Python/generated_cases.c.hhttps://github.com/python/cpython/pull/99398/files#diff-4ef46fa654f95502e49a24f7dc8ee31a4cac9b3433fe9cd2b2d4dd78cfbad448
View file https://github.com/brandtbucher/cpython/blob/47e430368704b9d3ad4928b1596797528cfaf9b4/Python/generated_cases.c.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/99398/files
Python/specialize.chttps://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
View file https://github.com/brandtbucher/cpython/blob/47e430368704b9d3ad4928b1596797528cfaf9b4/Python/specialize.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/99398/{{ revealButtonHref }}
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
https://github.com/python/cpython/pull/99398/files#diff-22e653d878778ca28317261f7826545288d02fd9980cf485d0329f28a34993f2
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.