EmbDev.net

Forum: ARM programming with GCC/GNU tools ARM/Thumb Speed differences?


Author: Mh Tay (lpc2103)
Posted on:

Rate this post
0 useful
not useful
Does anybody know roughly what's the speed difference
for same code compiled in ARM and in Thumb mode, running
on the Philips LPC2xxx chip??   20-30% slower in thumb??
Regards

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
MH Tay wrote:
> Does anybody know roughly what's the speed difference
> for same code compiled in ARM and in Thumb mode, running
> on the Philips LPC2xxx chip??   20-30% slower in thumb??
> Regards

IRC this has been discussed in the LPC2000 yahoo-group some time ago.

Author: Mh Tay (lpc2103)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
> IRC this has been discussed in the LPC2000 yahoo-group some time ago.

Got it, some Feb2004 old post says is 20-40% slower.
Peformance penalty is a bit high but don't think there is
a better choice for the smaller LPC2103.
Regards

Author: Clifford Slocombe (clifford)
Posted on:

Rate this post
0 useful
not useful
MH Tay wrote:
> Got it, some Feb2004 old post says is 20-40% slower.

I am not familiar with the LPC2xxx chip, but generally for best
performance you should match the instruction mode to the data bus width.
When accessing a 16 bit address bus, Thumb mode is typically faster that
ARM mode because ARM mode is forced to make two bus cycles for each
instruction and operand. So if your system has a 16bit bus for it's
program memory you are better off using Thumb mode for both performance
and code density. On a 32bit bus, the only advantage is code density.

I would imagine also that for C/C++ code, using short integers where
possible would help performance where a 16 bit bus is used.

Clifford

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.