This was the question in 1995 when we started to measure the performance of commercial available DSP-compilers. The performance was measured in such a way that the code produced by the compiler was compared to hand-written assembly code.
The difference between theses two implementations is measured in terms of code-size and execution time. This was done for several architectures in order to gain information about the abilities of the compilers to address certain features of the architecture.
Having a look at the Analog Devices DSP we clearly see that the handwritten assembly code almost outperforms the code produced by the compiler. The execution of the compiler generated code takes 8 times longer than the one written by hand. The code size also is significantly larger. This means if you develop your application with such a compiler you'll have to take a much faster DSP, spend more money for external memory. As a result nearly all time-critical applications are implemented by hand. Some of the reasons why DSP-Compilers are so bad are:
- unability to use machine idioms (MAC-operation)
- unability to make use of certain architectural features (zero overhead loops)
- unability to make use of possible instruction level parallelism
Most of the DSP-compilers are based on GPP-(general purpose-processor) compilers. Therefore the results are not very surprising.
Download the official DSP-Stone sources and theDSP-Stone report here. Updated sources for the TI TMS320C54x are available, too.