Reputation: 704
Do libraries like libfixmath perform better than arm FP and NEON or is there no gain from fixed point over existing FP hw?
I'm considering converting all instances of float in my code to a fixed point C++ class (similar to libfixmath) to optimize in terms of run-time an algorithm running on a Cortex-A9. The question is whether someone has any experience with this.
Current results with several fixed-point implementations both on Intel-i5 and on ARM-Cortex-A9 didn't show any improvement with fixed-point over floating point HW.
Upvotes: 0
Views: 1864
Reputation: 6354
Usually, fixed is much faster than float because :
However, if you are dealing with 32bit source data, thus requiring 64bit math, you might be better served with float since long integer operations require more cycles, registers, and instructions.
It rather depends on the source/target data type : when they are both integer, fixed is much better. If not, stick to float.
Upvotes: 1