We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Try using the single precision sinf() and sqrtf() rather than the double precision functions.Also, you should probably try using single precision constants, such as 1.23f rather than double precision 1.23.hths.
Thank you for your advice! The sinf and sqrtf function help a lot to save time! Did'nt know that.But i don't understand why he is doing exactly the same code/compiler/mcu (even integer arithmetic!) and is needing less cycles than my controller.Bst regards,Florian
To keep things simple, the compiler was also told to treat doubles as floats to restrict everything to the 32 bit float format.
How are you attempting to time the execution of each of the instructions?s.