Performance and memory#
Performance is measured separately from mathematical validation. Runtime results use repeated measurements and report medians and interquartile ranges. Peak-memory measurements use fresh processes and establish baselines after user inputs are resident.
Computational structure#
For a polar grid with \(N_rN_\theta\) points, the angular FFT contribution scales as
while field evaluation, interpolation, radial integration, reconstruction, and several array operations require \(O(N_rN_\theta)\) work. Over the measured range, the complete implementation is close to linear even though the FFT term retains its \(N\log N\) asymptotic complexity.
For sampled Cartesian input, interpolation can dominate runtime and temporary memory at large Cartesian grids.
Runtime tradeoff among the tested radial-resolution strategies.#
Incremental peak memory for callable input versus polar-grid size.#
Reproduce#
python benchmarks/benchmark_runtime.py
python benchmarks/plot_runtime.py
python -m pip install -e ".[benchmark]"
python benchmarks/benchmark_memory.py
python benchmarks/plot_memory.py
Absolute timings are hardware- and power-state-specific. The benchmark JSON records software versions, CPU information, affinity, and relevant threading environment variables so comparisons are interpretable.