How can I generation sine function faster in c -



How can I generation sine function faster in c -

is there anyway in can compute sine function faster in c.when generate sine waveform 16,384 samples taking me 3.96 seconds , want less 1 sec.

give below logic used sine wave , taking 4 seconds compute.i tried optimization of code of no help.

someone please help me out

int i; float f,temp = (2 * m_pi) /16384 for(i=0;i<16384;i++) { f = sin(temp * i); }

there's no reason have compute f more once, ever. if performance critical, hardcode array of values source.

c

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -