Performance

Compares the execution time and performance between static (Convolve) and dynamic (DyConvolve) convolution methods.

Static vs Dynamic Performance
from sgwt import Convolve, DyConvolve, impulse
from sgwt import DELAY_USA as L
import numpy as np
import time 

# Impulse
X  = impulse(L, n=1200)

# Pre-Determined Poles
scales = np.geomspace(1e-5, 1e2, 20)
poles = 1/scales

with Convolve(L) as conv:
    start = time.time()
    for i in range(10):
        Y = conv.bandpass(X, scales)
    T1 = time.time() - start


with DyConvolve(L, poles) as conv:
    start = time.time()
    for i in range(10):
        Y = conv.bandpass(X)
    T2 = time.time() - start
Static vs Dynamic Performance Comparison