Malte Mundt
|
Re: ARM v7: Poor performance for floating point math
|
Malte Mundt
11/27/2014 7:46 AM
post112459
|
Re: ARM v7: Poor performance for floating point math
This is a known issue at QNX internally.
The code by Dinkumware, the company QNX is licensing code of libm from, returns more accurate answers for edge values
and special cases than standard math libraries shipped e.g. with Linux. Special cases, for example, include raising a
number to the power -1: that just means dividing it into 1. Other special and edge values include plus and minus
infinity.
You should talk to your QNX rep to get a build of 'fdlibm' for QNX. It is less accurate, but much faster.
Cheers,
- Malte
> Hi,
>
> I'm running my QNX system on arm cortex A8 with neon, and experiencing that
> the floating point operations using the math library are very slow. Standard
> double precision floating point operations are about 2,6 times slower than on
> my PC (I assume this is as expected), while the math operations are more than
> 300 times slower.
>
> I'm compiling my program for ARM with the following options:
> -O3 -mfpu=neon -ftree-vectorize -mfloat-abi=softfp -funsafe-math-optimizations
> -ffast-math
>
> I have tried to replace the libm.so.2 with the libm-vfp.so.2 as recommended in
> the QNX help system, but this made no difference to the execution time.
>
> My test-program is attaced.
>
> Any suggestions on how to improve the performance?
>
> Thanks,
> Torstein Berge
|
|
|