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: Use individual reset threshold #703

Merged
merged 4 commits into from Nov 30, 2022
Merged

zstd: Use individual reset threshold #703

merged 4 commits into from Nov 30, 2022

Commits on Nov 30, 2022

  1. zstd: Use individual reset threshold

    Instead of setting the limit to the largest window size, set it to the chosen one.
    
    ```
    λ benchcmp before.txt after.txt
    benchmark                                         old ns/op     new ns/op     delta
    BenchmarkEncoder_EncodeAllSimple4K/fastest-32     3145          3133          -0.38%
    BenchmarkEncoder_EncodeAllSimple4K/default-32     41485         40624         -2.08%
    BenchmarkEncoder_EncodeAllSimple4K/better-32      49352         49197         -0.31%
    BenchmarkEncoder_EncodeAllSimple4K/best-32        421522        407392        -3.35%
    
    benchmark                                         old MB/s     new MB/s     speedup
    BenchmarkEncoder_EncodeAllSimple4K/fastest-32     1302.48      1307.39      1.00x
    BenchmarkEncoder_EncodeAllSimple4K/default-32     98.74        100.83       1.02x
    BenchmarkEncoder_EncodeAllSimple4K/better-32      83.00        83.26        1.00x
    BenchmarkEncoder_EncodeAllSimple4K/best-32        9.72         10.05        1.03x
    ```
    klauspost committed Nov 30, 2022
    Copy the full SHA
    ed7d49a View commit details
    Browse the repository at this point in the history
  2. Ensure 2 windows.

    klauspost committed Nov 30, 2022
    Copy the full SHA
    a8ca22b View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    c961b80 View commit details
    Browse the repository at this point in the history
  4. Keep two windows

    klauspost committed Nov 30, 2022
    Copy the full SHA
    5aac7c4 View commit details
    Browse the repository at this point in the history