3 ms·
Cortex-M4F has an FPU, i.e., hardware floating point support (albeit single precision only). You likely would see a much greater performance drop without it.
by jonathrg 2y ago
Cortex-M4F has an FPU, i.e., hardware floating point support (albeit single precision only). You likely would see a much greater performance drop without it.
- 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.
- magicalhippo 2y agoThis[1] page claims the M4F has about 25M FLOPS vs 1.5M FLOPS for the M4 thanks to the FPU, in single precision mode at least. [1]: https://s-o-c.org/cortex-m4f-vs-m4-how-do-these-arm-cores-compare/ https://s-o-c.org/cortex-m4f-vs-m4-how-do-these-arm-cores-co...