mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
IMPORT: slz: use the generic function for the last bytes of the crc32
This is the only place where we conditionally use the crc32_fast table, better call the crc32_char inline function for this. This should also reduce by ~1kB the L1 cache footprint of the compression when dealing with small blocks, and at least shows a consistent 0.5% perf improvement. This is slz upstream commit 075351b6c2513b548bac37d6582e46855bc7b36f.
This commit is contained in:
parent
dec1c36b3a
commit
027fdcb168
1 changed files with 1 additions and 1 deletions
|
|
@ -969,7 +969,7 @@ uint32_t slz_crc32_by4(uint32_t crc, const unsigned char *buf, int len)
|
|||
}
|
||||
|
||||
while (buf < end)
|
||||
crc = crc32_fast[0][(crc ^ *buf++) & 0xff] ^ (crc >> 8);
|
||||
crc = crc32_char(crc, *buf++);
|
||||
return crc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue