Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Looks fine to me.
Given @hauntsaninja 's feedback in #103141 , are you planning to land a single news entry for this and that one and #103034 that summarizes the changes and the overall perf impact?
Sorry, something went wrong.
There was a problem hiding this comment.
Hooray, thanks for working on this!
Sorry, something went wrong.
|
Given @hauntsaninja 's feedback in #103141 , are you planning to land a single news entry for this and that one and #103034 that summarizes the changes and the overall perf impact? Yeah, I'll try to rework the NEWS entry in #103034 to summarise the changes made in the performance-related PRs as well as that PR 👍 |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks great!
Sorry, something went wrong.
This PR is a bunch of micro-optimisations for typing._get_protocol_attrs that together have a significant impact on the speed of isinstance checks against runtime-checkable protocols.
Benchmark:Results on dfc4c95:
Results with this PR:
I'm once again skipping NEWS, since #103034 will counteract the boost to performance here, so the overall impact on performance for runtime-checkable protocols in 3.12 is still TBD.