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

Function using_bytecode_benchmark

Tools/importbench/importbench.py:152–156  ·  view source on GitHub ↗

Source w/ bytecode: {}

(seconds, repeat)

Source from the content-addressed store, hash-verified

150def _using_bytecode(module):
151 name = module.__name__
152 def using_bytecode_benchmark(seconds, repeat):
153 """Source w/ bytecode: {}"""
154 py_compile.compile(module.__file__)
155 yield from bench(name, lambda: sys.modules.pop(name), repeat=repeat,
156 seconds=seconds)
157
158 using_bytecode_benchmark.__doc__ = (
159 using_bytecode_benchmark.__doc__.format(name))

Callers

nothing calls this directly

Calls 3

benchFunction · 0.85
compileMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…