[Zlib-devel] patch-in-progress: vectorized adler32 calculation

Vincent Torri vtorri at univ-evry.fr
Sun Apr 11 19:07:56 EDT 2010



On Sun, 11 Apr 2010, Stefan Fuhrmann wrote:

> Hi there,
>
> I'm currently in the process of tuning the SVN backend code.
> After trimming the fat all over the place, I was finally reached
> a point where zlib accounts for almost 40% of the runtime.
>
> So, I looked into it. ~15% of the zlib runtime is spent in adler32
> and the C implementation is as fast as it gets (close to 1 byte
> per cycle). The attached masm32 code provides a vectorized
> version of the hotspot of that function. Details can be found
> at the top of the ASM files. Most of the code deals with
> reading parameters and aligning the source buffer.

why not using a cross-platform asm compiler like nasm or yasm, instead of 
masm ?

Vincent Torri

>
> I would like to see that code in one of the next zlib releases.
> So, please let me know, whether the quality is acceptable
> and what else has to be done. Currently, I'm working on a
> masm64 and gcc variants. Makefile changes will certainly
> also be on the list.
>
> Furthermore, the assembly implementations of fast_inflate
> have a number of performance issues (string ops and maybe
> register stalls) some of which I already fixed. But that part is
> not ready for review, yet.
>
> -- Stefan^2.
>
>
>




More information about the Zlib-devel mailing list