MCPcopy Index your code
hub / github.com/python/cpython / var_access_benchmark.py

File var_access_benchmark.py

Tools/scripts/var_access_benchmark.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1'Show relative speeds of local, nonlocal, global, and built-in access.'
2
3# Please leave this code so that it runs under older versions of
4# Python 3 (no f-strings). That will allow benchmarking for

Callers

nothing calls this directly

Calls 5

TimerClass · 0.90
make_nonlocal_readerFunction · 0.85
make_nonlocal_writerFunction · 0.85
repeatMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected