MCPcopy Index your code
hub / github.com/python/cpython / calc_optimization_table

Function calc_optimization_table

Tools/scripts/summarize_stats.py:1192–1202  ·  view source on GitHub ↗
(stats: Stats)

Source from the content-addressed store, hash-verified

1190
1191def optimization_section() -> Section:
1192 def calc_optimization_table(stats: Stats) -> Rows:
1193 optimization_stats = stats.get_optimization_stats()
1194
1195 return [
1196 (
1197 label,
1198 Count(value),
1199 Ratio(value, den, percentage=label != "Uops executed"),
1200 )
1201 for label, (value, den) in optimization_stats.items()
1202 ]
1203
1204 def calc_optimizer_table(stats: Stats) -> Rows:
1205 optimizer_stats = stats.get_optimizer_stats()

Callers

nothing calls this directly

Calls 4

CountClass · 0.85
RatioClass · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…