Introduction: Simple C Tuning
2-4
You can see cycle counts of 414, 98, 79, and 55 for functions in tutor1–4, run-
ning on the C6xxx simulator. Each of these functions contains the same C code
but has some minor differences related to the amount of information to which
the compiler has access.
The rest of this tutorial discusses these differences and teaches you how and
when you can tune the compiler to obtain performance results comparable to
fully optimized hand–coded assembly.
2.1.2
Getting Ready for Lesson 1
Compile and rerun the project
1) From Project menu, choose Rebuild All, or click on the Rebuild All icon.
All of the files are built with compiler options, –gp –k –g –mh –o3 –fr C:\ti\tu-
torial\sim62xx\optimizing_c.
2) From the file menu, choose Reload Program.
This reloads tutor.out and returns the cursor to c_int00.
3) From the Debug menu, choose Run, or click the Run icon.
The count in the Profile Statistics window now equals 2 with the cycle
counts being an average of the two runs.
4) Right–click in the Profile Statistics window and select clear all.
This clears the Profile Statistics window.
5) From the Debug menu, select Reset DSP.
6) From the Debug menu, select Restart.
This restarts the program from the entry point. You are now ready to start
lesson 1.