Skip to content

Instantly share code, notes, and snippets.

@Robofied
Created February 12, 2019 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robofied/e74e3cb4e858c2cf293daca758c31c99 to your computer and use it in GitHub Desktop.
Save Robofied/e74e3cb4e858c2cf293daca758c31c99 to your computer and use it in GitHub Desktop.
Numpy Library
c = 0
tic = time.time()
for i in range(1000000):
c += a[i]*b[i]
toc = time.time()
print("For loop " + str(1000*(toc-tic)) + "ms")
#[Output]:
#For loop 1236.6154193878174ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment