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

Function benchmark

project_euler/problem_145/sol1.py:132–145  ·  view source on GitHub ↗

Benchmarks

()

Source from the content-addressed store, hash-verified

130
131
132def benchmark() -> None:
133 """
134 Benchmarks
135 """
136 # Running performance benchmarks...
137 # slow_solution : 292.9300301000003
138 # solution : 54.90970860000016
139
140 from timeit import timeit
141
142 print("Running performance benchmarks...")
143
144 print(f"slow_solution : {timeit('slow_solution()', globals=globals(), number=10)}")
145 print(f"solution : {timeit('solution()', globals=globals(), number=10)}")
146
147
148if __name__ == "__main__":

Callers 1

sol1.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected