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

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -