]> git.ipfire.org Git - thirdparty/zstd.git/commit
Unroll Loop Core; Reduce Frequency of Repcode Check & Step Calc (+>1% Speed)
authorW. Felix Handte <w@felixhandte.com>
Fri, 20 Aug 2021 19:56:14 +0000 (15:56 -0400)
committerW. Felix Handte <w@felixhandte.com>
Wed, 1 Sep 2021 18:15:04 +0000 (14:15 -0400)
commit24fcccd05c6a3609715b9d9d1020129105c55116
treec7dba2581c0bd2625447c4b479e070ed6a9e4ab5
parent57a100f6dcb46fff20eacdfc9fc000b0f226b76f
Unroll Loop Core; Reduce Frequency of Repcode Check & Step Calc (+>1% Speed)

Unrolling the loop to handle 2 positions in each iteration allows us to reduce
the frequency of some operations that don't need to happen at every position.
One such operation is the step calculation, which is a very rough heuristic
anyways. It's fine if we do this a position later. The other operation is the
repcode check. But since the repcode check already tries expanding back one
position, we're really not missing much of importance by only trying it every
other position.

This commit also slightly reorders some operations.
lib/compress/zstd_fast.c