MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / benchmark_function

Function benchmark_function

graphs/breadth_first_search_2.py:73–77  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

71
72
73def benchmark_function(name: str) -> None:
74 setup = f"from __main__ import G, {name}"
75 number = 10000
76 res = timeit(f"{name}(G, 'A')", setup=setup, number=number)
77 print(f"{name:<35} finished {number} runs in {res:.5f} seconds")
78
79
80if __name__ == "__main__":

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected