5.5.5 How Can I Make My Code Faster?

Try the following suggestions for faster code execution:

  1. Smaller code can be faster code. Reducing the number of machine instructions that are necessary to perform a task will result in faster execution of that task. For details on making smaller and faster code, see the following sections of this user’s guide:

    How Can I Make My Code Smaller?

    How Can I Make My Interrupt Routine Faster?

  2. Depending on your compiler license, you may be able to use increasing optimization levels to generate faster code. For details, see the following chapter and section of this user’s guide:

    Optimizations

    Options for Controlling Optimization

  3. Algorithm choice has more impact on size and speed of your solution than any other factor. Choose the right algorithm for the job.