Skip to content

Instantly share code, notes, and snippets.

@rafaelhenrique
Created July 14, 2018 15:04
Show Gist options
  • Save rafaelhenrique/6dc789f95ae413afed375222a412d021 to your computer and use it in GitHub Desktop.
Save rafaelhenrique/6dc789f95ae413afed375222a412d021 to your computer and use it in GitHub Desktop.
Measure things with time (DONT USE THIS!)
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