3 ms·
>> Cortex-M4F has an FPU, i.e., hardware floating point support Maybe I wasn't clear. I know it has an FPU. I originally wrote the code in fixed point because
by phkahler 2y ago
>> Cortex-M4F has an FPU, i.e., hardware floating point support
Maybe I wasn't clear. I know it has an FPU. I originally wrote the code in fixed point because I knew it would be fast and didn't trust the FPU performance on such a small chip. Now I converted it to float and get the same performance.
I also used an "f" suffix on all constants to avoid accidental software double precision. Also used the GCC flags to force it all to single precision and use the hard float libs.
On smaller chips I used to expect fixed point to be faster than a hardware FPU, but that's no longer the case. They are about equal for me.
- jonathrg 2y agoI think I misread the comment (I thought you meant that 2x improvement seemed like too much, but perhaps you meant the opposite)
- Dylan16807 2y ago> On smaller chips I used to expect fixed point to be faster than a hardware FPU, but that's no longer the case. What kind of chip do you have in mind where that would be true? Notably, M4 is the first of its line to have an FPU option at all.