Hacker Newsnew | past | comments | ask | show | jobs | submit | mborg's commentslogin

There are two types of Fourier magic.

1. The magical orthogonal basis functions: complex sinusoids. Shifting of a time signal just multiplies the Fourier counterpart by a new phase (relative to its represented frequency). Thus transforming to the Fourier basis enables an alternate method of implementing a lot of linear operations (like convolution, i.e. filtering).

2. The magic of the fast implementation of the Discrete Fourier Transform (DFT) as the Fast Fourier Transform (FFT) makes the above alternate method faster. It can be most easily understood by a programmer as a clever reuse of intermediate results from inner loops. The FFT is O(N log N), a direct DFT transform would be O(N^2)

A mathy demonstration of this at https://sourceforge.net/projects/kissfft/


The article leaves out a pretty important question you should ask yourself: "What fraction of the data will I need to access?"

If the answer is "much less than the whole file", accessing the data over the network makes sense. Otherwise, you should almost certainly bring it to a local disk, where mmap shines.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: