Skip to content

Add LSX compare256 implementation#547

Merged
folkertdev merged 1 commit into
trifectatechfoundation:mainfrom
Gelbpunkt:compare256-lsx
Jul 16, 2026
Merged

Add LSX compare256 implementation#547
folkertdev merged 1 commit into
trifectatechfoundation:mainfrom
Gelbpunkt:compare256-lsx

Conversation

@Gelbpunkt

Copy link
Copy Markdown
Contributor

Tests pass, I'd love a benchmark run on this PR.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
fuzz-compress ?
fuzz-decompress ?
test-aarch64-apple-darwin 89.32% <ø> (-0.04%) ⬇️
test-aarch64-unknown-linux-gnu 84.88% <ø> (ø)
test-i686-unknown-linux-gnu 84.35% <ø> (-0.02%) ⬇️
test-x86_64-apple-darwin 88.27% <ø> (-0.03%) ⬇️
test-x86_64-unknown-linux-gnu 89.37% <ø> (-3.68%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
zlib-rs/src/deflate/compare256.rs 95.90% <ø> (ø)

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Gelbpunkt

Copy link
Copy Markdown
Contributor Author

I see gains of around 4% on silesia-small at compression level 1, which uses the quick algorithm, that in turn uses compare256:

Benchmark 1 (39 runs): target/release/examples/compress-baseline 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           129ms ± 1.05ms     128ms …  132ms          0 ( 0%)        0%
  peak_rss           38.2MB ± 17.8MB    25.2MB … 84.2MB          0 ( 0%)        0%
  cpu_cycles          271M  ±  437K      270M  …  272M           0 ( 0%)        0%
  instructions        589M  ±    0       589M  …  589M           0 ( 0%)        0%
  cache_references    336M  ±  180K      335M  …  336M           0 ( 0%)        0%
  cache_misses       28.4M  ±  194K     28.2M  … 28.9M           0 ( 0%)        0%
Benchmark 2 (41 runs): target/release/examples/blogpost-compress 1 rs silesia-small.tar
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           124ms ±  877us     123ms …  127ms          1 ( 2%)        ⚡-  4.0% ±  0.3%
  peak_rss           31.9MB ± 12.3MB    24.4MB … 59.2MB          0 ( 0%)          - 16.4% ± 17.8%
  cpu_cycles          260M  ±  487K      259M  …  261M           0 ( 0%)        ⚡-  4.0% ±  0.1%
  instructions        574M  ±    0       574M  …  574M           0 ( 0%)        ⚡-  2.4% ±  0.0%
  cache_references    315M  ±  185K      314M  …  315M           3 ( 7%)        ⚡-  6.3% ±  0.0%
  cache_misses       26.0M  ±  229K     25.8M  … 26.9M           6 (15%)        ⚡-  8.5% ±  0.3%

@folkertdev
folkertdev merged commit 97417b3 into trifectatechfoundation:main Jul 16, 2026
41 checks passed
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