Skip to content

Commit

Permalink
Brief benchmark docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FinleyMcIlwaine committed Feb 12, 2024
1 parent 94246f0 commit 3c6618d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# snappy-c benchmarks

There are five benchmark groups, all benchmarking compression and/or
decompression on 2MB chunks of data:

1. `random`: Pseudo-randomly generated bytes, the least compressible type of
data that we benchmark on.
2. `zeros`: All zeros (`\NUL`). The most compressible type of data that we
benchmark on.
3. `words`: A repeated sequence of 8 bytes, over and over. Also extremely
compressible.
4. `interleaved_words`: Repeated sequences of 8 bytes, separated by 8 random
bytes in between. Meant to occupy a space on the "compressibility" spectrum
in between `random` and `words`.
5. `combined`: All of the above types of data.

`combined` is meant to capture performance on all the types of data meantioned
above, so it's a good one to use if looking for regressions or more balanced
performance metrics.

Run all benchmarks with:
```
cabal run bench-snappy-c
```

Or just the combined with:
```
cabal run bench-snappy-c -- 'combined'
```

0 comments on commit 3c6618d

Please sign in to comment.