Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Time-a-function/11l/time-a-function.11l
Normal file
12
Task/Time-a-function/11l/time-a-function.11l
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
F do_work(x)
|
||||
V n = x
|
||||
L(i) 10000000
|
||||
n += i
|
||||
R n
|
||||
|
||||
F time_func(f)
|
||||
V start = time:perf_counter()
|
||||
f()
|
||||
R time:perf_counter() - start
|
||||
|
||||
print(time_func(() -> do_work(100)))
|
||||
Loading…
Add table
Add a link
Reference in a new issue