Updates to Hand-Tuning Loops on C6000 Application Note

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Introduction

This page contains updates to the application note tidoc:spra666 Hand-Tuning Loops and Control Code on the TMS320C6000. Updates may arise as the compiler changes release to release, or new techniques are discovered. All such changes are collected in this article. Eventually, a revision of the application note may be issued.

Update to Section 5.2.7 Optimizing Conditional Expressions

Some readers have taken from this section that is always good to transform conditional expressions like:

if (cond1 && cond2)     // note &&
{
   ...
}

to:

if (cond1 & cond2)     // note &
{
   ...
}

This is not the case. One reason this is not the case is that the compiler may perform this transformation for you. The likelihood of the compiler performing this transformation automatically has gone up in recent releases. However, that does not mean you will never need to apply this technique manually. It is possible that, in an important inner loop, manually changing "&&" to "&" (or "||" to "|") could cause a loop to perform much better.

All that said, do not perform this change indiscriminately. Wait until you find a loop that is performing poorly and contains "&&". Then manually change to "&" to see if it helps.

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Updates to Hand-Tuning Loops on C6000 Application Note here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox