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

Function benchmark

maths/least_common_multiple.py:37–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def benchmark():
38 setup = (
39 "from __main__ import least_common_multiple_slow, least_common_multiple_fast"
40 )
41 print(
42 "least_common_multiple_slow():",
43 timeit("least_common_multiple_slow(1000, 999)", setup=setup),
44 )
45 print(
46 "least_common_multiple_fast():",
47 timeit("least_common_multiple_fast(1000, 999)", setup=setup),
48 )
49
50
51class TestLeastCommonMultiple(unittest.TestCase):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected