Skip to content

Instantly share code, notes, and snippets.

@entron
Created August 16, 2015 19:10
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 entron/e33c44046f5d887b0b5f to your computer and use it in GitHub Desktop.
Save entron/e33c44046f5d887b0b5f to your computer and use it in GitHub Desktop.
import time
from numpy import *
def dottest(type, dim):
t = time.time()
a = random.random((dim, dim)).astype(type)
b = random.random((dim, dim)).astype(type)
c = dot(a, b)
ct = time.time() - t
print "++++++++++++++++++++++++"
print "Data typ:", type
print "Time used:", ct
dottest(float32, 2000)
dottest(float64, 2000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment