]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Restructure the loop, and see about 3% speedup in run time. I believe the
authorShuxin Yang <shuxinyang2006@gmail.com>
Tue, 18 Mar 2014 01:17:23 +0000 (18:17 -0700)
committerhansr <hk-git@circlestorm.org>
Wed, 8 Oct 2014 12:15:37 +0000 (14:15 +0200)
commit34bf824bf755fdf4979a9ed26e86028a12fdedc8
tree052e976273a8b6949b10e44d267b0eb70d1783a0
parentc787ff04c3139fd6cba14a689e3e84b923be96e8
Restructure the loop, and see about 3% speedup in run time. I believe the
speedup arises from:
    o. Remove the conditional branch in the loop
    o. Remove some indirection memory accesses:
       The memory accesses to "s->prev_length" s->strstart" cannot be promoted
       to register because the compiler is not able to disambiguate them with
       store-operation in INSERT_STRING()
    o. Convert non-countable loop to countable loop.
       I'm not sure if this change really contribute, in general, countable
       loop is lots easier to optimized than non-countable loop.

Conflicts:
deflate.h
deflate.c
deflate.h