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

Update vendored zstd to 1.5.6 #143

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Update vendored zstd to 1.5.6 #143

merged 2 commits into from
Jul 30, 2024

Conversation

Viq111
Copy link
Collaborator

@Viq111 Viq111 commented Jul 26, 2024

Same workflow as #125

  • Run below:
git clone https://github.com/facebook/zstd.git c
cd c
git checkout v1.5.6
cd ..
git clone [email protected]:DataDog/zstd.git go
find c/lib \( -name '*.h' -o -name '*.c' -o -name '*.S' \) -exec cp -v {} go/ \;
  • Run python tools/flatten_imports.py
  • Run python tools/insert_libzstd_ifdefs.py

This is the code as of https://github.com/facebook/zstd/releases/tag/v1.5.6 (facebook/zstd@794ea1b)

Benchmarks will come in the next comment

@Viq111
Copy link
Collaborator Author

Viq111 commented Jul 29, 2024

Benchmarks on a Apple M1 Max:

goos: darwin
goarch: arm64
pkg: github.com/DataDog/zstd
                       │     old     │                new                 │
                       │   sec/op    │   sec/op     vs base               │
BulkCompress-10          900.1n ± 2%   926.6n ± 1%  +2.94% (p=0.000 n=10)
BulkDecompress-10        473.8n ± 0%   484.3n ± 0%  +2.23% (p=0.001 n=10)
CtxCompression-10        66.77m ± 0%   67.31m ± 1%  +0.81% (p=0.004 n=10)
CtxDecompression-10      9.392m ± 0%   8.633m ± 0%  -8.08% (p=0.000 n=10)
StreamCompression-10     74.13m ± 2%   74.50m ± 1%       ~ (p=0.143 n=10)
StreamDecompression-10   11.17m ± 1%   10.28m ± 1%  -7.95% (p=0.000 n=10)
Compression-10           67.07m ± 1%   67.73m ± 1%  +0.99% (p=0.001 n=10)
Decompression-10         9.422m ± 1%   8.701m ± 1%  -7.66% (p=0.000 n=10)
geomean                  1.855m        1.815m       -2.14%

                       │      old      │                 new                  │
                       │      B/s      │      B/s       vs base               │
BulkCompress-10           97.47Mi ± 2%    94.69Mi ± 1%  -2.86% (p=0.000 n=10)
BulkDecompress-10         114.7Mi ± 0%    112.2Mi ± 0%  -2.18% (p=0.001 n=10)
CtxCompression-10         142.4Mi ± 0%    141.3Mi ± 1%  -0.80% (p=0.004 n=10)
CtxDecompression-10      1012.4Mi ± 0%   1101.4Mi ± 0%  +8.80% (p=0.000 n=10)
StreamCompression-10      128.3Mi ± 2%    127.6Mi ± 1%       ~ (p=0.138 n=10)
StreamDecompression-10    851.2Mi ± 1%    924.8Mi ± 1%  +8.64% (p=0.000 n=10)
Compression-10            141.8Mi ± 1%    140.4Mi ± 1%  -0.98% (p=0.001 n=10)
Decompression-10         1009.2Mi ± 1%   1092.9Mi ± 1%  +8.29% (p=0.000 n=10)
geomean                   266.2Mi         272.0Mi       +2.18%

Overall the performance seems to be very similar. Bulk* APIs seems to have taken a 2-3% hit, Decompression speed got a nice 7-8% boost.

We will cut a pre-release and test in our environments

@Viq111 Viq111 marked this pull request as ready for review July 29, 2024 16:46
@Viq111 Viq111 merged commit b52f603 into 1.x Jul 30, 2024
8 checks passed
@Viq111 Viq111 deleted the viq111/1.5.6 branch July 30, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants