else/Templates/timetest.py

23 lines
276 B
Python
Raw Normal View History

2016-12-23 03:42:21 +00:00
import time
LOOPS = 10000
def func_1():
pass
def func_2():
pass
start = time.time()
for x in range(LOOPS):
func_1()
end = time.time()
print('v1', end - start)
start = time.time()
for x in range(LOOPS):
func_2()
end = time.time()
print('v2', end - start)