Skip to content

Instantly share code, notes, and snippets.

@i-sync
Created December 19, 2019 08:29
Show Gist options
  • Select an option

  • Save i-sync/0c0a0f9d7db8d5dfd80d69c6e390df69 to your computer and use it in GitHub Desktop.

Select an option

Save i-sync/0c0a0f9d7db8d5dfd80d69c6e390df69 to your computer and use it in GitHub Desktop.
testing
import time
from test1 import result as add1
from test2 import result as add2
t1 = time.time()
for i in range(1000000):
add1(i)
t1 = time.time() - t1
print(t1)
t1 = time.time()
for i in range(1000000):
add2(i)
t1 = time.time() - t1
print(t1)
a = 10;
def add(num):
return num + a;
def result(num):
return add(num)
a = 10;
class test:
def add(self, num):
return num + a;
t = test()
def result(num):
#t = test()
return t.add(num)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment