[Zlib-devel] infnew-5 available for testing

Mark Adler madler at alumni.caltech.edu
Thu Jan 9 22:29:01 EST 2003


On Thursday, January 9, 2003, at 05:43  PM, Chris Anderson wrote:
> In a fit of sleeplessness, I generated some asm files with different
> compiler optimizations and found that icc generates a faster inflate()
> when loop unrolling is disabled (-unroll0).

Chris,

Thanks again for your testing.

> One of the differences
> between icc -O3 and icc -O3 -prof_use is that icc -O3 unrolls this loop
> and icc -O3 -prof_use does not (infnew-5/inffast.c):

This does not surprise me.  I tried several variations on the amount of 
loop unrolling and used the optimal amount for the distribution of 
lengths in typical deflate streams (I should say optimal for my 
processor).

> The asm for this loop without unrolling looks like this
...
>         movl      48(%esp), %ebx                                #234.25
>         addl      $-3, %ebx                                     #234.25
>         movl      %ebx, 48(%esp)                                #234.25

That's interesting.  I would think that any self-respecting compiler 
would keep the loop counter in a register instead of on the stack.  
Then again, perhaps I'm more used to a processor with 32 registers than 
one with eight.

mark





More information about the Zlib-devel mailing list