Created
July 14, 2018 15:04
-
-
Save rafaelhenrique/6dc789f95ae413afed375222a412d021 to your computer and use it in GitHub Desktop.
Measure things with time (DONT USE THIS!)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import time | |
start = time() | |
summation = 0 | |
for element in range(1, 1000): | |
summation += element | |
end = time() | |
print(end - start) | |
start = time() | |
sum(range(1, 1000)) | |
end = time() | |
print(end - start) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment