Math computing time statistics for ARM7TDMI and MSP430

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

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

...

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); }

Reply to
Richard
Loading thread data ...

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

Reply to
Wilco Dijkstra

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.