gh-93429: Merge `LOAD_METHOD` back into `LOAD_ATTR` by Fidget-Spinner · Pull Request #93430 · python/cpython · GitHub

github.com

Tin mới

Fidget-Spinner:load_attr_load_method

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Shrinking the inline caches faster-cpython/ideas#396

Merge LOAD_METHOD back into LOAD_ATTR

awaiting core review

📜🤖 Added by blurb_it.

Remove LOAD_ATTR_METHOD_MODULE

Merge branch 'load_attr_load_method' of

https://github.com/Fidget-Spi…

https://gist.github.com/Fidget-Spinner/115bfda368d42ee5231e87d7f395cf77

@markshannon, basically no difference in pyperformance. I see that as a good thing!

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

about 5% of instructions, statically

LOAD_ATTR represents about 5% of instructions, statically so adding 6 code units for each LOAD_ATTR will increase the size of the bytecode by about 10%. This seems high and is likely to cause some slowdowns due to cache

The inline cache for LOAD_ATTR is too large. #93533

Make LOAD_METHOD a virtual instruction

Merge remote-tracking branch 'upstream/main' into load_attr_load_method

Regen files, add unused field

Merge specialization code more (stats are still broken)

Merge remote-tracking branch 'upstream/main' into load_attr_load_method

fix up stats and comments

Shrink load method cache

fail automatically when seeing a method

awaiting change review

add back METHOD to the switch-case to avoid warnings

🔨 test-with-buildbots
🔨 test-with-buildbots

🔨 test-with-buildbots

View reviewed changes

Apply mark's suggestions

Revert 30935 defer bpo45162 to 312 (

emscripten-core/emscripten#17269

https://github.com/python/cpython/issue/89336

bpo-45565: Specialize LOAD_ATTR_CLASS #29146

More LOAD_ATTR specializations #89728