This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Speed Optimization for math functions



Hi,

I have a code with mean,Std deviation and Variance calculation on 500 sample points.I am using ARM5@ 50 MHz I am getting 50 ms processing time. I felt going with DSP will reduce the processing time. Now when I ported the same code with just Math.h  and compiled for C64+ and C5000 Accurate cycle simulator, strangely rather than reduction in clock cycles I am getting increase in clock cycle and when multiplied by 100MHz I am getting time around 70 ms(using profiler or CCS clock enable/disable methods).

How to perform speed optimization, I am using CCS 5 and default compiler settings,some functions like "powf" referes to math.h, do they required any specific header files to be included?

Can the compiler automatically generates code for floating point instruction and reduces the processing speed?

Simulating mathematical C codes in Simulators what header files and code structures we need to add so that we get faster operation? or do we need to write some part in assembly?

 

Regards,

Chaitanya