Skip to content

test: comprehensive benchmark suite against C zstd #24

Description

@polaz

Summary

To track progress toward performance parity with C zstd, we need a comprehensive benchmark suite that measures both compression and decompression against the C reference on standardized corpora.

What needs to be implemented

Benchmark scenarios

  1. Silesia corpus — standard compression benchmark (12 files, ~200MB total)
  2. Small data (1KB-10KB) — critical for CoordiNode LSM-tree values
  3. Large data (100MB+) — tests throughput scaling
  4. High entropy (random data) — worst case for compression
  5. Low entropy (repeated patterns) — best case

Measurements per scenario

  • Compression speed (MB/s) at each level
  • Decompression speed (MB/s)
  • Compression ratio
  • Peak memory usage
  • Comparison against C zstd (via zstd crate FFI wrapper) at same level

Infrastructure

  • Use existing criterion dev-dependency
  • Flamegraph integration for hot path identification
  • CI integration for regression detection

Dictionary benchmarks

  • Train dictionary on sample set
  • Measure compression ratio with/without dictionary
  • Compare against C zstd dictionary compression

Acceptance criteria

  • Criterion benchmarks for compress/decompress at all implemented levels
  • Comparison against C zstd at same levels
  • Flamegraph generation script
  • Small data (1-10KB) benchmarks for CoordiNode use case
  • Results documented in benchmark report

Time estimate

2d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-highHigh priority — core functionalityenhancementNew feature or requestperformancePerformance optimization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions