This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F280039C: CLA performs much worse than CPU with optimization

Part Number: LAUNCHXL-F280039C

I've been writing code for control and found that though the CLA performs marginally better than the CPU without optimization, it performs far worse than the CPU with -O2 (opt_for_speed = 4) optimization. Surely I'm doing something wrong since from what I've read, the CLA should perform similarly to the CPU, if not better, for the floating-point calculations my code does? That is indeed the case without optimization but certainly not the case with optimization.

These are the timings I got for functions in the code I attached. I timed them using ePWM. All the code for the calculations is in the objects/include/ directory of my included zip folder. 

FOC_code.zip