Arduino Due performance on sin()

Tested running 100.000 sin() calls and it took 2594 milliseconds. That means you make call sin() at 38.55kHz. If you want to make 44.1kHz sound in real-time there’s no way you can use the sin() method.

Here’s the code I used

void SpeedTest()
{
float f = 1.23;

Serial.println(millis());

for (uint32_t i=0; i<10000; i++) { f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); f=sin(f); } Serial.println(millis()); Serial.println(f); }