I was wondering why is it better to use the library fftw3
to calculate the power spectral density or for the Fourier transformation of data , instead of implementing a function the run the mathematics needed for this purpose .
Asked
Active
Viewed 98 times
-2

Engine
- 5,360
- 18
- 84
- 162
-
4Becase it's the **Fastes Fourier Transform in the West.**? because it's very efficient and takes care of floating point details and uses the best algorithms and ... ... because it's widespread and you will unlikely beat it in any aspect writing your own `fft`? – Iharob Al Asimi Jan 15 '15 at 12:37
-
There are many ways of implementing a function to run the mathematics, and naive first implementations can be slow, buggy or both. – hotpaw2 Jan 16 '15 at 02:09
1 Answers
1
Why reinvent the wheel?
- Academic purposes
- You have time to waste, see 1.
- You are a code wizard and you know your code is superior in all ways.
Why not reinvent the wheel?
- Speed of development: writing everything from scratch is just not doable
- Accuracy of result: you are bound to miss corner cases or introduce subtle bugs that high-quality libraries have already solved for you.
- Portability of code: face it, your code will not be as good as code that has been molded into its current shape for several years.

rubenvb
- 74,642
- 33
- 187
- 332