Fastest way to do sin(), cos() atan2()

robtillaart:

I think it better to do optimization yourself when you recognize that something can be optimized.

Unless you know the compiler very well, your own attempts at optimization will rarely if ever be better than the compilers.

The proof is allways in the pudding test, if manual optimizations work, they work, if not, don't use them.

This is all completely compiler dependent. In Arduino, the default environment (and there is no easy way to change this) optimizes for executable size, which means that the code could actually execute more slowly is certain cases. The most common optimizations typically make code bigger. So hand optimizations, when the compiler is targeting small code size, could be undone.