added some code to time loading from gmsh vs. from pickle
This commit is contained in:
parent
1af176a6e0
commit
1a4d635362
13
tools/timing/load_pickle.py
Normal file
13
tools/timing/load_pickle.py
Normal 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
|
12
tools/timing/read_gmsh_file.py
Normal file
12
tools/timing/read_gmsh_file.py
Normal 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'))
|
Loading…
Reference in New Issue
Block a user