[Zlib-devel] would an arm asm for decompression be useful ?
John Bowler
jbowler at frontiernet.net
Mon Apr 19 19:29:17 EDT 2010
From: Vincent Torri
>We use zlib on arm, especially
>for decompression (compression is not a problem for us). My question is:
>can the decompression speed on arm be improved by using asm ? Generic arm
>or neon.
Possibly, on specific platforms, at the probable cost of slowing everything down on different platforms.
ARM is far more variable than iAPX86; for example very few ARM processors have Neon, and probably very few ever will have it because Neon is application specific (like any co-processor). The same applies to ARMv6 SIMD, hardware floating point, Jazelle and, to some extent, even Thumb.
The consequence is that it is normally much more effective to leave such optimizations to the compiler.
It is easy to write ARM assembler for (a lot easier than x86), but it's also easy to write good compilers for ARM. In my experience I can code for the ARM in C just by producing code that the compiler can understand.
One approach that may be worth trying is to use puff instead of inflate. ARM processors tend to have smaller L1 caches than x86 and they frequently use a mixed instruction/data cache. If you reduce the code size substantially it may massively increase throughput.
BTW, there is almost certainly an inflate implementation out there written in ARM assembler (or, maybe, a mix of ARM assembler and BASIC). That's because the original commercial multi-tasking OS for the ARM was written entirely in ARM assembler (well, macro assembler) and the people who wrote it had a strong belief that assembler trumped high level languages for any non-UI programming.
John Bowler <jbowler at acm.org>
More information about the Zlib-devel
mailing list