René's URL Explorer Experiment


Title: Refine specialization caches and extend binary-op coverage by youknowone · Pull Request #7386 · RustPython/RustPython · GitHub

Open Graph Title: Refine specialization caches and extend binary-op coverage by youknowone · Pull Request #7386 · RustPython/RustPython

X Title: Refine specialization caches and extend binary-op coverage by youknowone · Pull Request #7386 · RustPython/RustPython

Description: Summary Align BINARY_OP_EXTEND with descriptor-cache model: table-driven specialization for int|int bitwise, float|int and int|float mixed arithmetic Add _spec_cache (init/getitem) to HeapTypeExt with proper GC traverse/clear and lock-guarded version validation Tighten CALL_ALLOC_AND_ENTER_INIT stack-space and recursion guards Add latin-1 singleton string interning path for single-char subscript results Test plan cargo clippy clean extra_tests/snippets/vm_specialization.py passes CI: macOS, Ubuntu, Windows (existing flaky failures only) 🤖 Generated with Claude Code Summary by CodeRabbit Bug Fixes Clarified error message for invalid init return values. Chores Performance improvements for mixed-type arithmetic and binary operations via a new extended fast-path. Faster handling and caching for single-character strings. Centralized and more robust type-specialization caching; improved frame dispatch and init/cleanup handling. Vectorcall and exact-args call path tightened for safer fast-path use. Tighter tracing: trace callbacks now run only for actual trace events.

Open Graph Description: Summary Align BINARY_OP_EXTEND with descriptor-cache model: table-driven specialization for int|int bitwise, float|int and int|float mixed arithmetic Add _spec_cache (init/getitem) to HeapTypeExt ...

X Description: Summary Align BINARY_OP_EXTEND with descriptor-cache model: table-driven specialization for int|int bitwise, float|int and int|float mixed arithmetic Add _spec_cache (init/getitem) to HeapTypeExt ...

Opengraph URL: https://github.com/RustPython/RustPython/pull/7386

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a4a02bf2-d9c5-34b4-fea1-0a8aad4556c3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD658:19CD0D:B5E4AA:F3A5E6:6A5B6888
html-safe-nonce6691a8fe4e65e6a270dd25488a0b04544687264a29bf685293b3c40280e920d8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjU4OjE5Q0QwRDpCNUU0QUE6RjNBNUU2OjZBNUI2ODg4IiwidmlzaXRvcl9pZCI6IjQxMDMwODAwNDMxNzM2MDM0NjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac112b0f426a769e81e9c2bb5156c5a79b35fcd787ef82cdfd886383ae39cc5b0d
hovercard-subject-tagpull_request:3369923291
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/RustPython/RustPython/pull/7386/files
twitter:imagehttps://avatars.githubusercontent.com/u/69878?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/69878?s=400&v=4
og:image:altSummary Align BINARY_OP_EXTEND with descriptor-cache model: table-driven specialization for int|int bitwise, float|int and int|float mixed arithmetic Add _spec_cache (init/getitem) to HeapTypeExt ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
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
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/7386/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F7386%2Ffiles
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%2FRustPython%2FRustPython%2Fpull%2F7386%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=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/7386/files
Reloadhttps://github.com/RustPython/RustPython/pull/7386/files
Reloadhttps://github.com/RustPython/RustPython/pull/7386/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
RustPython https://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Notifications https://github.com/login?return_to=%2FRustPython%2FRustPython
Fork 1.5k https://github.com/login?return_to=%2FRustPython%2FRustPython
Star 22.2k https://github.com/login?return_to=%2FRustPython%2FRustPython
Code https://github.com/RustPython/RustPython
Issues 291 https://github.com/RustPython/RustPython/issues
Pull requests 103 https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality 0 https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Code https://github.com/RustPython/RustPython
Issues https://github.com/RustPython/RustPython/issues
Pull requests https://github.com/RustPython/RustPython/pulls
Discussions https://github.com/RustPython/RustPython/discussions
Actions https://github.com/RustPython/RustPython/actions
Projects https://github.com/RustPython/RustPython/projects
Models https://github.com/RustPython/RustPython/models
Wiki https://github.com/RustPython/RustPython/wiki
Security and quality https://github.com/RustPython/RustPython/security
Insights https://github.com/RustPython/RustPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowone:specializationhttps://github.com/youknowone/RustPython/tree/specialization
Conversation 14 https://github.com/RustPython/RustPython/pull/7386
Commits 14 https://github.com/RustPython/RustPython/pull/7386/commits
Checks 12 https://github.com/RustPython/RustPython/pull/7386/checks
Files changed https://github.com/RustPython/RustPython/pull/7386/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
Refine specialization caches and extend binary-op coverage https://github.com/RustPython/RustPython/pull/7386/files#top
Show all changes 14 commits https://github.com/RustPython/RustPython/pull/7386/files
5393e86 Align BINARY_OP_EXTEND with CPython descriptor cache model youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/5393e866dcc4589f2cc568d7cd3106cd7470274e
5bc6078 Align type _spec_cache and latin1 singleton string paths youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/5bc60780713299138f1ab6fd3483249ab5bdb773
cb156c1 Add specialization differential harness and align init error text youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/cb156c1db6b5221fe2e4048a823e5ca9e88b963b
fc4728b Tighten CALL_ALLOC_AND_ENTER_INIT stack-space guard youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/fc4728bbe16e9385521dd662244e06606d35a49f
c487b6d Align call-init frame flow and spec cache atomic ordering youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/c487b6d3e0d638ddafc06f57fbc5dfefe751bc50
2dd64b8 Refine call-init recursion guard and cache swap lifetime handling youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/2dd64b84174b4469dc94d329b487c8ea7abde8f2
a0c302c Align spec cache write locking with CPython contract youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/a0c302c459433bab6e8f59e7899bd77942986ffe
ceefe6e rename youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/ceefe6ebd135b202cf2f88ea22eee9ef021d30ba
2d7cb74 address review: invalidate init cache on type modification, add cspel… youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/2d7cb7449a8ef06a834a6328118239ab9b206d05
f7924dd Align load attr miss cooldown with CPython youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/f7924ddf38f487d093900b1b816c3e36adc48802
138d48e Align CALL descriptor and class-call specialization with CPython youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/138d48e4ca335e3c79f9be179aeeb9a49144834c
aa9f5a8 address review: check datastack space for extra_bytes, require CO_OPT… youknowone Mar 8, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/aa9f5a8150c6e9590a73588268e24b7c0f10609c
a277b86 Extract datastack_frame_size_bytes_for_code, skip monitoring for init… youknowone Mar 9, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/a277b86cfbe3952c515c5f05fca0be1a9c5f9fbb
dbd8b1a Fix Constants newtype usage in init_cleanup_code youknowone Mar 9, 2026 https://github.com/RustPython/RustPython/pull/7386/commits/dbd8b1a4660404df99dce73a35b3d182b2f59247
Clear filters https://github.com/RustPython/RustPython/pull/7386/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
function.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
str.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
type.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-fb88962f9343ca7b8d31bfe34f5063136575e05eadae6fccb3b64658e14b0d6c
frame.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-03f2741d7d424014f3d2f0c82226be52fa58134aab34bf0780714ee67a248deb
ext.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-ccab52adc1059b887873204f5691f9782da457688e788cfa7b214961357e11fa
callable.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-c628df2d1e9da9a44072436e1be957a381d2755ff2456d3474c1eca1debf4ff3
builtins.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-ce8bd80bb61ce870dbf04415913693df814ebda260d3fc784b689a657e694ca3
slot.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-1b5587c15bdfe9ff552fbc35e014eef20d6b7934fbb31b922cf35d87e8837b7b
context.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-266ab6550d81a4d367e5ef4973281aecf61c7abb46760195fc4ad6064bca0791
mod.rs https://github.com/RustPython/RustPython/pull/7386/files#diff-fe30ecf7c6b462e46e0874a55a05ea0edba83cefad5ac7a86e7137fa8f86ba74
crates/vm/src/builtins/function.rshttps://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
View file https://github.com/youknowone/RustPython/blob/dbd8b1a4660404df99dce73a35b3d182b2f59247/crates/vm/src/builtins/function.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7386/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
coderabbitaihttps://github.com/apps/coderabbitai
Mar 9, 2026https://github.com/RustPython/RustPython/pull/7386/files#r2903038786
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
https://github.com/RustPython/RustPython/pull/7386/files#diff-42d321490bc76e3b57deebb41ff9815e8bbb7c976bb1b57a076d01f7bc347698
crates/vm/src/builtins/str.rshttps://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
View file https://github.com/youknowone/RustPython/blob/dbd8b1a4660404df99dce73a35b3d182b2f59247/crates/vm/src/builtins/str.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/7386/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
https://github.com/RustPython/RustPython/pull/7386/files#diff-a04ea1f7734fe40189e756196e034e6dedfcd5c82f2925e58cfd51ba7432073a
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/7386/files
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.