Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import datetime
- def prueba():
- a=1000
- b=100
- return a>b
- def prueba2():
- a=1000
- b=100
- valor=False
- if a>b:
- valor=True
- return valor
- if __name__=="__main__":
- t = datetime.datetime.now()
- for x in range(1000):
- p = prueba()
- tiempo1=datetime.datetime.now()-t
- t = datetime.datetime.now()
- for x in range(1000):
- p = prueba2()
- tiempo2=datetime.datetime.now()-t
- print tiempo1, tiempo2, " - " , tiempo1-tiempo2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement