lpc2100_fan <lpc2100_fan@...> schrieb am Mon, 18 Jul 2005 16:03:08
-0000:
> just a brief comment about ARM mode and THUMB mode. Depending on the
> memory architecture and access time ARM mode can be good (faster) or
> very bad (larger and slower).
2nd reply, just to make my opinion clearer:
My rule of thumb :-) is, smaller code results in faster code.
Therefor I use Thumb mode and compile with -Os.
But as every rule, there are exceptions like the following, which gives
nice code in ARM mode (though larger):
int f[100];
int v[100];
int a (void)
{
int i;
int sum = 0;
for(i = 0; i < 100; ++i){
sum += f [i]*v[i];
}
return sum;
}
--
42Bastian SchickMessage
Re: [lpc2000] Re: gcc problem / why (or not) to use ARM mode
2005-07-19 by 42Bastian Schick