Browse Source

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

master
Stephen M. McQuay 10 years ago
parent
commit
1a4d635362
  1. 13
      tools/timing/load_pickle.py
  2. 12
      tools/timing/read_gmsh_file.py

13
tools/timing/load_pickle.py

@ -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

12
tools/timing/read_gmsh_file.py

@ -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'))
Loading…
Cancel
Save