DSPFilters icon indicating copy to clipboard operation
DSPFilters copied to clipboard

Optimize on 32bit machines using 32-bit float as default type

Open qywx opened this issue 7 years ago • 1 comments

For example ARM Cortex-M4 is 32-bit core. It has 32-bit FPU and can multiply and divide float values in one instruction. But operating with double values is much less efficient. So let's discuss and decide what should be changed to make float default type for the DspFilters library. Please help. Thank you.

qywx avatar Mar 09 '17 12:03 qywx

  1. Templates in templates like in this PR https://github.com/vinniefalco/DSPFilters/pull/22/files
  2. Preprocessor macro #define FLOATTYPE float

The second one is easier to implement. You should check for numerical issues though.

galchinsky avatar Mar 09 '17 12:03 galchinsky