cpython
cpython copied to clipboard
Add "Total Machine Code Cost" of UOps to PyStats
At the sprints at PyConUS 2024, @brandtbucher suggested an improvement to pystats data. Right now, the Tier 2 stats include a count of how many times each UOp is executed, but Brandt suggested another useful table would be UOp Execution Count * Length of UOp in Machine Instructions, sorted by this metric.
In this way, UOps that are extremely common but cheap can be deprioritized, and work can be focused on improving UOps that are less common but take up more 'time' overall (with machine code length as a proxy for time).
I'm happy to take this on.
Linked PRs
- gh-119693