AnsweredAssumed Answered

long long format calculation takes too long

Question asked by McRock on Apr 15, 2014
Latest reply on Apr 15, 2014 by bookevg

i found that my program takes too much time recently. so i did a little test like below.

//start timer

a = a*b;

//stop timer

when a and b are int or float type it take 45 CPU counts.

and when they are long long or long double it take 117 CPU counts.

and the timer operation take 41 CPU counts.

this may not seem to be a serious problem. but i need some SIN and COS functions...the 32bit sin() takes 167-41 CPU counts and 64bit sind() takes 2221-41 CPU counts. this is some time i can not afford.

what i take from this is that the proportional correlation of  a 64 bit calculation and a 32 bit one is about 19 to 1.

is there any way to optimize the 64 bit calculation?

BTW : I'm using ADSP-21489 and VDSP++ update 10. is there a switch for float processor somewhere?

Outcomes