cpython icon indicating copy to clipboard operation
cpython copied to clipboard

Add "Total Machine Code Cost" of UOps to PyStats

Open JeffersGlass opened this issue 1 year ago • 0 comments

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

JeffersGlass avatar May 28 '24 21:05 JeffersGlass