Skip to content

Use .as_chunks_mut() instead of .chunks_exact_mut() for better performance#51

Merged
Shnatsel merged 3 commits intomainfrom
as-chunks
Nov 30, 2025
Merged

Use .as_chunks_mut() instead of .chunks_exact_mut() for better performance#51
Shnatsel merged 3 commits intomainfrom
as-chunks

Conversation

@Shnatsel
Copy link
Collaborator

@Shnatsel Shnatsel commented Nov 30, 2025

Gives a significant boost on the benchmarks in the mid-range sizes - big enough to use the large variable size codepath, but small enough not to be entirely bottlenecked on memory access.

Supersedes #15

Benchmarks on desktop Zen4: https://gist.github.com/Shnatsel/1d700a953ba94435bfa53415fc671ed4

Benchmarked using RUSTFLAGS='-C target-cpu=native' cargo bench 'PhastFT' --bench=bench -- --baseline=main-native

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.29%. Comparing base (7dc39b1) to head (6f6ff7d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #51   +/-   ##
=======================================
  Coverage   99.29%   99.29%           
=======================================
  Files          12       12           
  Lines        2257     2277   +20     
=======================================
+ Hits         2241     2261   +20     
  Misses         16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Shnatsel
Copy link
Collaborator Author

Since this speeds up the part that crosses both halves, this makes the gains from #50 even greater, with −73.529% time for Forward f64/PhastFT DIT/16777216 or close to 4x speedup

@Shnatsel Shnatsel merged commit 877ad1d into main Nov 30, 2025
8 checks passed
@Shnatsel Shnatsel deleted the as-chunks branch November 30, 2025 17:31
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