mborgerding / kissfft

a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid
Other
1.46k stars 283 forks source link

Optimised build for sizes that are powers of 2 #75

Open nickovs opened 2 years ago

nickovs commented 2 years ago

Currently the code allows for arbitrary numbers of samples in the input. This is great when you need it, but it requires a lot of code that remains unused when the input length is a power of 2.

It would be very helpful for users embedding this library into memory-constrained applications if there was a build option to disable support with sizes that are not powers of 2. In this configuration the kf_bfly3, kf_bfly5 and kf_bfly_generic functions could be left out altogether, which would save quite a bit of space in the binary.