Skip to content

Commit

Permalink
lazier profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
sixpearls committed Apr 9, 2019
1 parent 81ab637 commit b81454f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 1d-profile.py
Expand Up @@ -50,17 +50,17 @@ def run_test():
run_ndspline()

print("timing external run1")
print(" scipy: ", timeit.timeit(run1_scipy, number=1_000_000))
print("ndspline: ", timeit.timeit(run1_ndspline, number=1_000_000))
print(" scipy: ", timeit.timeit(run1_scipy, number=10_000))
print("ndspline: ", timeit.timeit(run1_ndspline, number=10_000))

print("timing external run big")
print(" scipy: ", timeit.timeit(run_scipy, number=100_000))
print("ndspline: ", timeit.timeit(run_ndspline, number=100_000))
print(" scipy: ", timeit.timeit(run_scipy, number=1_000))
print("ndspline: ", timeit.timeit(run_ndspline, number=1_000))

lp = LineProfiler()
lp.add_function(NDBPoly.NDBPoly.get_us_and_cc_sel)
lp.add_function(NDBPoly.NDBPoly.__call__)
lp_wrapper = lp(run_test)
# lp_wrapper()
# lp.print_stats()
lp_wrapper = lp(external_NDBspline.__call__)
lp_wrapper(0.0)
lp.print_stats()

0 comments on commit b81454f

Please sign in to comment.