// Does Wokwi use the #pragma compiler options ? Answer: Yes
// The #pragma can change the time from 4381 ms to 5402 ms.
// Fast pragmas
// ----------------
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-O3")
// Slow pragmas
// ----------------
//#pragma GCC optimize("-O0")
void setup()
{
Serial.begin(115200);
Serial.println("Start");
unsigned long t1 = millis();
// Make "volatile" to force the compiler to generate
// the code and call the functions.
volatile float x = 1.0;
for(unsigned long l=0; l<10000; l++)
{
x += sqrt(((x/1.5)*(x/1.5)) + ((x/2.3)*(x/2.3))) - atan(x) - log(x);
}
unsigned long t2 = millis();
Serial.print("Ready (");
Serial.print(x);
Serial.println(")");
Serial.print("That took ");
unsigned long elapsedMillis = t2 - t1;
Serial.print(elapsedMillis);
Serial.println(" ms");
}
void loop()
{
delay(10);
}