GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-131798: fold super method lookups in JIT by kumaraditya303 · Pull Request #148231 · python/cpython Conversation
|
|
I see a 10% speedup on richards_super with this PR! Mean +- std dev: [richards_super_main] 28.8 ms +- 0.5 ms -> [richards_super_fold] 26.1 ms +- 0.5 ms: 1.10x faster |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one stylistic nit. Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return sym_new_not_null(ctx); | ||
| } | ||
| /* Normal case: obj_type must be a subtype of su_type */ | ||
| if (!PyType_IsSubtype(obj_type, su_type)) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note to self: this is not same as subclasscheck/instancecheck, which can call arbitrary code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Please fix the merge conflicts. LOAD_CONST_UNDER_INLINE_BORROW was removed as it's a duplicate of _INSERT_1_LOAD_CONST_INLIE_BORROW #148235 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Fixed. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| _Py_BloomFilter_Add(dependencies, su_type); | ||
| PyType_Watch(TYPE_WATCHER_ID, (PyObject *)obj_type); | ||
| _Py_BloomFilter_Add(dependencies, obj_type); | ||
| return sym_new_const_steal(ctx, lookup); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note to self: need steal version because _PySuper_Lookup returns a strong reference, unlike _PyType_Lookup
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please pull in main and regen cases. Thank you. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can we have a test for the case where the superclass changes after optimization, to make sure that we de-opt properly? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Added test and fixed merge conflicts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the test
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.