-
-
Save scottstanfield/c2bf0f9f8c3bc85ba5f0c87b2d0baad4 to your computer and use it in GitHub Desktop.
This file contains 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
import numpy as np | |
import time | |
N = 102400 | |
x = np.linspace(0.0123, 4567.89, N) | |
def mine(x,Z,func,name): | |
print(name) | |
start = time.time() | |
for z in range ( 0, Z ) : | |
y = func(x); | |
end = time.time() | |
print(N, Z, end - start) | |
return | |
mine(x,10000,np.sin,'np.sin') | |
mine(x,10000,np.cos,'np.cos') | |
mine(x,10000,np.tan,'np.tan') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment