Open dhermes opened 9 years ago
As of 76ba2518477d37d08ccbdac3de72053d4a6e3613
--- butterfly_algorithm.py 2015-02-17 22:48:16.833886489 -0800
+++ butterfly_algorithm.py 2015-02-17 22:48:55.901887121 -0800
@@ -1,5 +1,6 @@
import numpy as np
from itertools import izip
+import time
def compute_f_hat(f, t, s, kernel_func):
@@ -225,6 +226,7 @@
A2_minus = A2(M, -delta_S)
A2_plus = A2(M, delta_S)
+ start = time.time()
for ell in xrange(1, L + 1):
update_func = make_update_func(A1_minus, A1_plus, A2_minus,
A2_plus, delta_T)
@@ -239,5 +241,7 @@
A_update(A1_minus, scale_multiplier=0.5, upper_diags=True)
A_update(A2_plus, scale_multiplier=2.0, upper_diags=False)
A_update(A2_minus, scale_multiplier=2.0, upper_diags=False)
+ duration = time.time() - start
+ print 'N log N portion duration: %g' % (duration,)
return compute_t_by_bins(t, coeff_vals, L)
Using custom timing around the
L
refinement stages, we see theO(N)
coefficient creation (puttings
in bins) and coefficient application (puttingt
in bins) dominates: