Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/dabeaz/python-cookbook
/ test
Function
test
src/14/make_your_programs_run_faster/example.py:2–8 ·
view source on GitHub ↗
(func)
Source
from the content-addressed store, hash-verified
1
import
time
2
def
test(func):
3
start = time.time()
4
nums = range(1000000)
5
for
n in range(100):
6
r = func(nums)
7
end = time.time()
8
print(func.__name__,
':'
, end-start)
9
10
import
math
11
def
compute_roots_1(nums):
Callers
1
example.py
File · 0.70
Calls
1
func
Function · 0.50
Tested by
no test coverage detected