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

Function generator

Tools/ftscalingbench/ftscalingbench.py:97–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95
96@register_benchmark
97def generator():
98 accu = 0
99 for i in range(100 * WORK_SCALE):
100 for v in simple_gen():
101 accu += v
102 return accu
103
104class Counter:
105 def __init__(self):

Callers 4

_assert_type_errorMethod · 0.85
callbackMethod · 0.85

Calls 1

simple_genFunction · 0.85

Tested by 4

_assert_type_errorMethod · 0.68
callbackMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…