PERF: #48212 Cache the results of get_block_type (1.1.x) #48213
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This gave a ~5% performance boost. It looks like things started to slow down in this area after 0.19.2 with more costly type checking.
As mentioned on #48212, I'm upgrading a large codebase and 1.1.x is the limit I can get to without significant changes (upgrading of codebase, libraries, and environments/machines), so this is a great stepping stone. I'd appreciate if this would get accepted as a patch release for it, I'm happy to go through the other 1.x branches to apply the change once a pattern is confirmed.
It looks like the automated CI run doesn't like trying to run on/for 1.1.x, so I'll have a run when I swap machines, but imagine I'll have to make a branch based on master sooner rather than later to get confidence from CI.
closes PERF: get_block_type heavy use could benefit performance improvements #48212 (Replace xxxx with the Github issue number)- not closing as targeting a 1.1.xTests added and passed if fixing a bug or adding a new featureAdded type annotations to new arguments/methods/functions.doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.