added some code to time loading from gmsh vs. from pickle

This commit is contained in:
Stephen M. McQuay 2011-09-27 15:29:23 -06:00
parent 1af176a6e0
commit 1a4d635362
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import sys
import pickle
import time
import scipy.spatial
start = time.time()
g = pickle.load(open(sys.argv[1], 'r'))
g.tree = scipy.spatial.KDTree(g.points)
end = time.time()
print end - start

View File

@ -0,0 +1,12 @@
import sys
import time
import pickle
from interp.grid.gmsh import ggrid
start = time.time()
g = ggrid(sys.argv[1])
print time.time() - start
g.tree = None
pickle.dump(g, open(sys.argv[2], 'w'))