Optimizing source code to run on a specific platform can be challenging. While code-creation tools are improving, they haven't kept up with the rapidly increasing functionality and complexity of processors. The more complex the hardware architecture, the harder it is to program in assembly language.
This creates the need for abstraction via a robust C compiler or operating system. But since not all compilers handle source code in the same manner, you may need to rewrite your C source many times to achieve an efficient output.
While trial and test are valuable for optimizing source code, other methods exist. First, the compiler can use built-in functions. Second, C-callable specific libraries can be implemented. The combination of built-in functions and core-specific libraries will improve the code performance without getting involved in the complexity of the architecture.
Take Analog Devices' Blackfin processor, which is supported by open-source tools such as a gcc compiler and uClinux kernel. Recent efforts to incorporate built-in functions in the compiler and port several signal-processing-specific libraries have greatly improved its code efficiency.
Click here to download the PDF version of this entire article.