Why are floating point operations so slow on my Nucleo
I wanted to check speed of trigonometric operations on my Nucleo L432KC. I toggle pin state and look at my oscilloscope. I use Arduino IDE.
The calculations for trigonometric functions turned out to take several hundred of clock cycles. I was disappointed, but I didn't know what to expect. But then I checked 1./x, and it also turned out to be terribly slow, although, according to my understanding, it should be 12 cycles. What could be wrong?
<too big for one post>It doesn't matter if I use functions ending with 'f' or not and the functions without 'f' become drastically even much slower when I try casting variables to double. So probably the calculations are in floats. Also, according to my understanding or the compilation output, the FPU is being used:
<too big for one post>Does anyone have any idea what could be wrong?