Hi,
some years ago, at our company, we did a simple test supposed to illustrate the performance of code generated by the TI (CCS 5.1) and the IAR (EW 5.40.6) compiler for floating point computations with the MSP430F5438 MCU. In both setups we used full speed optimization. The code under test was:
volatile float i;
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
PIN_LED_PROGRUN_INIT; // Init port pin for output
i = 3.14f;
for (;;)
{
LED_PROGRUN_TOGGLE; // Toggle pin using exclusive-OR
i = i * 3.14f * 4.124f; // do some float operations
if (i > 0.0f)
i = i / 3.14f;
}
The result was that the IAR-generated code was 5-times faster. We decided for IAR EW. I wanted to reconsider the decision and made the test again a few days ago using IAR 6.4 and CCS 6.1.0 with TI compiler v4.4.3. I tried different compiler switches and optimization levels - always with the same result as a few years ago: the pin is toggled about every 200 µs with the IAR-generated code and about every 1 ms with the TI-generated code.
In the assembly I can see that IAR-compiler uses some special floating point routines (which surely incorporate the integer hardware multiplier) and this is not the case for the TI compiler. I also tried Crossworks compiler which was as fast as the IAR compiler.
It seems that there has been no progress in the development of the TI-compiler for MSP430 in terms of floating point computations for the last few years and would like to ask:
1. Does anybody know a way of boosting the performance of basic floating point arithmetic comparable to what TI did with mathlib for basic floating point functions (and I'm not thinking about tuning it in assembler myself)
2. Is there any activity going on to improve the TI-generated code? It is a commercial compiler and we would be willing to pay for it if it could measure up with the competition.
Kind regards,
Filip
P.S.
Trying GCC compiler is not an option for me since I have had big troubles using it with 20-bit addressing.