GH-100288: Specialize class attribute loads#101379
GH-100288: Specialize class attribute loads#101379brandtbucher wants to merge 1 commit intopython:mainfrom
Conversation
|
If this addresses the "class attr simple" case, then according to the stats it should improve the hit rate by 4-5% (13.3% * 0.36). |
I assume so. Here are the stats for the base commit and this branch. For I'm guessing that there are two reasons why the number of hits didn't increase by the full 5% you're expecting:
So, it appears that "class attr simple" is not so "simple" after all... 5 out of 6 instances that reach it have a |
|
When (if?) you fix the merge conflict, could you add those new opcodes to the LOAD_ATTR family and properly declare their cache/stack effects, letting the generator take care of those? I recently modernized all the existing family members (gh-101488). |
This handles all of the "class attr simple" failures.
Benchmarking results are "1.00x faster". It improves the
LOAD_ATTRhit rate by less than 1%, and has a 32% miss rate (I suspect, due to polymorphism).