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

Function simple_fibonacci_time

maths/matrix_exponentiation.py:109–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107
108
109def simple_fibonacci_time() -> float:
110 setup = """
111from random import randint
112from __main__ import simple_fibonacci
113"""
114 code = "simple_fibonacci(randint(1,70000), 1, 1)"
115 exec_time = timeit.timeit(setup=setup, stmt=code, number=100)
116 print(
117 "Without matrix exponentiation the average execution time is ", exec_time / 100
118 )
119 return exec_time
120
121
122def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected