Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - ARM v7: Poor performance for floating point math: (2 Items)
   
ARM v7: Poor performance for floating point math  
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
Attachment: Text FloatingPointTest.c 2.92 KB
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