]> git.ipfire.org Git - thirdparty/zstd.git/commit
Rewrite `step` to Track Increment Between Pairs of Positions
authorW. Felix Handte <w@felixhandte.com>
Mon, 13 Dec 2021 19:48:26 +0000 (14:48 -0500)
committerW. Felix Handte <w@felixhandte.com>
Mon, 13 Dec 2021 19:48:26 +0000 (14:48 -0500)
commit6ca5f424025d0f34cf1234cde0ba13b20469da46
tree459512a71ee1f8402f96f09bc071a93112351522
parentb8434cb754ea6c6f2869f035f2d97a112df7fa68
Rewrite `step` to Track Increment Between Pairs of Positions

The position updates are rewritten from `ip[N] = ip[N-1] + step` to be
`ip[N] = ip[N-2] + step`. This lets us only deal with the asymmetric spacing
of gaps at setup and then we only have to keep a single `step` variable.

This seems to work quite well on GCC and Clang!
lib/compress/zstd_fast.c