EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Math computing time statistics for ARM7TDMI and MSP430

Started by Tilmann Reh November 17, 2006
>>Jonathan Kirwan wrote: > > Did you imagine I'd learn any new detailed techniques from this? > > /******************************************************************************* > * > * Name : Floating-point Math > * Purpose : Benchmark floating-point math functions. > * > *******************************************************************************/ > float add(float a, float b) > { > return (a + b); > }
... 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); }
"Jonathan Kirwan" <jkirwan@easystreet.com> wrote in message 
news:6evgn2p580pf8s74bvd0s09le6ig487aou@4ax.com...

> But the first page you mention above describes TI's approach of trying > to focus on chip performance and to ignore C compiler issues as a > "flawed" approach. Frankly, that's what I'm interested in because I > usually mix assembly with C in applications I write and therefore it > _IS_ valuable to me to know what the chip can do regardless of the C > compiler.
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

Memfault Beyond the Launch