Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zstd: Improve throughput of SpeedBestCompression encoder #699

Merged
merged 1 commit into from Nov 26, 2022

Commits on Nov 26, 2022

  1. zstd: Improve throughput of SpeedBestCompression encoder

    Lifted ofCode and mlCode computations out of match.estBits, so that
    method will be inlined into its only caller. Also some changes to
    eliminate a branch: the last if block becomes two CMOVs/CSELs on
    amd64 and arm64.
    
    name                              old speed      new speed       delta
    Encoder_EncodeAllSimple/best-8    11.1MB/s ± 1%   16.9MB/s ± 1%  +52.23%  (p=0.000 n=10+10)
    Encoder_EncodeAllSimple4K/best-8  8.41MB/s ± 1%  10.95MB/s ± 0%  +30.20%  (p=0.000 n=10+10)
    
    name                              old alloc/op   new alloc/op    delta
    Encoder_EncodeAllSimple/best-8       20.0B ± 0%      18.0B ± 0%  -10.00%  (p=0.002 n=8+10)
    Encoder_EncodeAllSimple4K/best-8     2.00B ± 0%      2.00B ± 0%     ~     (all equal)
    greatroar committed Nov 26, 2022
    Copy the full SHA
    63aa31a View commit details
    Browse the repository at this point in the history