facebook / facebook/zstd

"./examples/streaming_decompression" considerably slower than "zstd -d"

Open
#3,632 3 comments 0 reactions 1 assignee Claimed by @Cyan4973 View on GitHub
question
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

**Describe the bug**
The `streaming_decompression` tool in the `examples` folder is consistently slower than `zstd -d`, I wonder what could be the cause?

I tried to link `streaming_compression` statically and dynamically, no difference there.

**Expected behavior**
The run time is supposed to be comparable, but `streaming_decompression` is consistently slower, about 20% slower than `zstd -d` on a Centos 7 machine.

```
zstd155 --no-check < data > data.zst

sudo sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches"
time -p zstd155 -d < data.zst > data1

sudo sh -c "/bin/echo 3 > /proc/sys/vm/drop_caches"
time -p ./zstd155/examples/streaming_decompression data.zst > data2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.