MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / var_access_benchmark.py

File var_access_benchmark.py

tools/python-3.11.9-amd64/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 7

TimerClass · 0.90
make_nonlocal_readerFunction · 0.85
make_nonlocal_writerFunction · 0.85
minFunction · 0.85
repeatMethod · 0.80
printFunction · 0.50
formatMethod · 0.45

Tested by

no test coverage detected