[zlib] Unconditional refill for literals with fastpath
This change refills the bit-buffer unconditionally at the start of each iteration, and will decode up to two literals if they are in the root table before proceeding with regular decoding. Therefore, it requires an update on the entry requirements of inflate_fast_chunk i.e. we have two extra writes to the output buffer in the same iteration (258 bytes + 2 bytes = 260 bytes). Aside a few corner cases (e.g. JPG and PDF), it was a net gain for all other inputs. In some cases up to impressive +46.3% for HTML4 in the snappy data corpus on Icelake processors. Observed decompression average gains were: Raptor Lake (p-core: +11.3%, e-core: +6.6%), Cascade Lake (+13.1%), Icelake (+16%), Sapphire Rapids (+11.9%) and M1 (+4.3%). Second patch based on Dougall Johnson's research (https://dougallj.wordpress.com/2022/08/20/). Bug: 1354990 Change-Id: I8e88cef05964bc46134adf3e72e12c081dc1e2db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4247146 Reviewed-by: Chris Blume <cblume@chromium.org> Reviewed-by: Hans Wennborg <hans@chromium.org> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Commit-Position: refs/heads/main@{#1110499} NOKEYCHECK=True GitOrigin-RevId: 3411d3d734c01ac995a34ff8f11ca8b71d9ccd09
Loading
Please register or sign in to comment