4. Improving performance

This chapter describes various techniques to improve the performance of C code on the C28x CPU. One or more of the techniques described below or a combination of techniques can be used to improve performance. Techniques that are beneficial will depend on the nature of the application and can vary from application to application. For example:

  • Executing from RAM illustrates improving performance by placing frequently executed functions in RAM.

  • Optimization levels provides an overview of compiler optimization levels.

  • Inlining can improve performance in an application with multiple levels of function calls.

  • Compiler annotations such as Pragmas, Assertions and Restrict provide additional information to the compiler to help improve the performance of generated code.

  • Loop unrolling is a technique to improve the performance of small loops.

  • Leveraging DMAC instructions describes how to leverage the Dual Multiply Accumulate (DMAC) instructions from C source.