Math computing time statistics for ARM7TDMI and MSP430

Nov 17, 2006 61 Replies

/*******************************************************************************

*******************************************************************************/

...

This code is.... pure genius. They should further improve it thusly: /* INPUT * a - a float * b - b float * RETURN * a float based on some operations on a and b * * GLOBAL VARIABLES USED * None * LOCAL VARIABLES USED * None * FUNCTIONS USED * None * * REVISIONS: * V1 - Dec 12, 2001, initial code * V1.01 - Dec 15, 2001, changing stuff around after code review * V2 - June 9, 2003, user reported bug, fixed * V3 - May 17, 2004, increased speed by 10x */ float add(float a, float b) { return (a + b); }

Yes, but they still used the C compiler, but just switched off all optimization. That's the same as comparing the performance of cars by driving them around in first gear.

If they wanted to avoid comparing the compiler they should have written everything in assembler.

Wilco

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required