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.

TMS320F280039: Compiler speed vs. size trade offs options

Part Number: TMS320F280039


Tool/software:

Hi Champ,

May i know if optimization level select off, the speed vs. size trade offs option will working or not?

for example , below two case generate binary code be same or not?

case 1 : -Ooff --opt_for_speed=2

case 2 : -Ooff --opt_for_speed=4

  • There might be some differences.  But it won't be much.  The option --opt_level (-O is a short equivalent) indicates how much of the code the compiler considers at one time when making optimization decisions.  Most optimizations improve both speed and size.  But a few optimizations trade-off speed and size. i.e. they improve one while degrading the other.  For those few optimizations, the --opt_for_speed setting is how you tell the compiler to balance that trade-off.  Therefore, you generally want --opt_level to be as high as possible, without regard to the setting of --opt_for_speed.

    Thanks and regards,

    -George