gh-107674: Remove some unnecessary code in instrumentation code - #117393
Conversation
ericsnowcurrently
left a comment
There was a problem hiding this comment.
LGTM
FWIW, I'm unclear about the merit of this PR relative to addressing the performance regression identified in gh-107674. However, the change itself is correct and not a problem, so I don't see any reason not to merge it.
|
The changes (including the one in Also, even though it might not be significant or even observable, this strictly improves the performance by removing an unnecessary comparison, so the gh issue is not that irrelevant :) |

This might not be super helpful but it's free and easy to justify. Also it makes the code cleaner, not messier.
line >= 0was already asserted above so the check is unnecessaryPy_Noneis immortal now soPy_DECREFis a no-op.