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

Function writing_bytecode_benchmark

Tools/importbench/importbench.py:120–126  ·  view source on GitHub ↗

Source writing bytecode: {}

(seconds, repeat)

Source from the content-addressed store, hash-verified

118def _writing_bytecode(module):
119 name = module.__name__
120 def writing_bytecode_benchmark(seconds, repeat):
121 """Source writing bytecode: {}"""
122 assert not sys.dont_write_bytecode
123 def cleanup():
124 sys.modules.pop(name)
125 os.unlink(cache_from_source(module.__file__))
126 yield from bench(name, cleanup, repeat=repeat, seconds=seconds)
127
128 writing_bytecode_benchmark.__doc__ = (
129 writing_bytecode_benchmark.__doc__.format(name))

Callers

nothing calls this directly

Calls 1

benchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…