On a machine slower than the one timed in this chapter

PHYSICS · Multi-part · Fermi University Physics · Computational Physics · Scientific programming for physicists · Scientific programming for physicists

Computational Physics, Ch Spectra of sampled signals

Problem

On a machine slower than the one timed in this chapter, the direct sum y~k=∑nyne−2πikn/N\tilde{y}_k=\sum_n y_ne^{-2\pi\mathrm{i}kn/N} takes 8.5 ms8.5\,\mathrm{ms} for a record of N=256N=256 samples and 0.136 s0.136\,\mathrm{s} for N=1024N=1024. The library's fast transform, on the same machine, takes 12 μs12\,\mu\mathrm{s} at N=1024N=1024 and 56 μs56\,\mu\mathrm{s} at N=4096N=4096. ((a)) Fit a power law t∝Nαt\propto N^{\alpha} to each pair of timings and give the two exponents. ((b)) Predict from its fitted law how long the direct sum takes at N=4096N=4096. ((c)) Extrapolate the same law to N=106N=10^6 and give the direct sum's time there in hours.

Browse the problem library