Title: Implement LOAD_ATTR inline caching with adaptive specialization by youknowone · Pull Request #7292 · RustPython/RustPython · GitHub
Open Graph Title: Implement LOAD_ATTR inline caching with adaptive specialization by youknowone · Pull Request #7292 · RustPython/RustPython
X Title: Implement LOAD_ATTR inline caching with adaptive specialization by youknowone · Pull Request #7292 · RustPython/RustPython
Description: Add type version counter (tp_version_tag) to PyType with subclass invalidation cascade. Add cache read/write methods (u16/u32/u64) to CodeUnits. Implement adaptive specialization in load_attr that replaces the opcode with specialized variants on first execution: LoadAttrMethodNoDict: cached method lookup for slotted types LoadAttrMethodWithValues: cached method with dict shadow check LoadAttrInstanceValue: direct dict lookup skipping descriptors Specialized opcodes guard on type_version_tag and deoptimize back to generic LOAD_ATTR with backoff counter on cache miss. Summary by CodeRabbit New Features Adaptive bytecode caching with warmup/backoff and lazy quickening for hot instructions Per-type and per-function versioning to manage cache invalidation Instruction specialization and deoptimization pathways to revert optimized opcodes Fast-path call/load and specialization fallback for improved runtime performance Refactor Bytecode serialization now uses original instruction bytes directly Chores Updated spell-checker dictionary and ignore list entries
Open Graph Description: Add type version counter (tp_version_tag) to PyType with subclass invalidation cascade. Add cache read/write methods (u16/u32/u64) to CodeUnits. Implement adaptive specialization in load_attr that ...
X Description: Add type version counter (tp_version_tag) to PyType with subclass invalidation cascade. Add cache read/write methods (u16/u32/u64) to CodeUnits. Implement adaptive specialization in load_attr that ...
Opengraph URL: https://github.com/RustPython/RustPython/pull/7292
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7941eccd-512a-86b1-5389-b7ed4f152262 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C73A:2F98EE:8856DD:AF85E0:6A5C0C3C |
| html-safe-nonce | a4837c6d6a5a1c30c80baacbf5e3f6281ad8043cc91e23c613c47aa2674e70ba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzNBOjJGOThFRTo4ODU2REQ6QUY4NUUwOjZBNUMwQzNDIiwidmlzaXRvcl9pZCI6IjExNDExODk1MTk3NTQzOTg3ODAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a44b0102a2fe37f8db4e7771479e96e221e402d6896e1710635b74a6cdbe49cb |
| hovercard-subject-tag | pull_request:3340417744 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/7292/files |
| twitter:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/69878?s=400&v=4 |
| og:image:alt | Add type version counter (tp_version_tag) to PyType with subclass invalidation cascade. Add cache read/write methods (u16/u32/u64) to CodeUnits. Implement adaptive specialization in load_attr that ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width