[Tremor] Tremor ARM performance issues

Nicolas Pitre nico at cam.org
Fri Dec 5 07:09:36 PST 2008


On Fri, 5 Dec 2008, Nicholas Vinen wrote:

> However, the trick is that the ARM assembly code which is part of Tremor
> isn't going to work in Thumb mode. So, I'd have to compile the files
> mdct.c, floor0.c and floor1.c without Thumb, and the rest with it.
> 
> So my basic question is this: is the performance benefit of the assembly
> code worth the penalty of the extra cycle per instruction for any
> function which uses it? I have a feeling it isn't.

It certainly is -- please see the performance increase results I posted 
on this list... hmmm... a couple years ago.  The list archive must 
certainly have them.  I don't have the ARM manual handy at the moment, 
but I suspect you'd need several more Thumb instructions to do the same 
as those optimized ARM assembly sequences which would spend even more 
cycles.

> If I avoid using the
> assembly, and thus can compile everything in thumb mode, this also
> avoids some annoying library issues (the C library doesn't seem to
> support being called from both Thumb and regular ARM mode).

The section of code where the assembly optimization is doesn't need to 
call any other library functions, does it?  So you may have only the 
mdct code in ARM mode for example.

The other solution is to enable the LOW_PRECISION mode which doesn't 
need any 64-bit computation and therefore could probably generate decent 
Thumb assembly and also be faster and create a smaller binary due to the 
reduced table sizes, but with a tiny artifact in the produced output.


Nicolas


More information about the Tremor mailing list