Skip to content

Add stats for "unlikely events" that will impact optimization. #114312

@markshannon

Description

@markshannon

Events such as using changing the __code__ attribute of a function, or the __bases__ of a class, are rare.
At least we presume that they are rare.
We want to optimize code with the assumption that they are rare (see See faster-cpython/ideas#645).

So, we needs stats to confirm that they are rare, and hopefully give us some insight into how rare.

We should add a struct to the interpreter to track these events as they occur, and if stats are enabled add that data to the stats output.

Linked PRs

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions