Skip to content

refactor: copy_from_slice per row#52

Merged
shssoichiro merged 1 commit intorust-av:mainfrom
FreezyLemon:copy-from-slice-per-row
Apr 16, 2026
Merged

refactor: copy_from_slice per row#52
shssoichiro merged 1 commit intorust-av:mainfrom
FreezyLemon:copy-from-slice-per-row

Conversation

@FreezyLemon
Copy link
Copy Markdown
Contributor

Found this while working on #51.

Benchmarking copy_from_slice_u8: Collecting 100 samples in estimated 5.0011 s (131k iterati
copy_from_slice_u8      time:   [38.180 µs 38.386 µs 38.580 µs]
                        change: [−95.645% −95.632% −95.620%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 18 outliers among 100 measurements (18.00%)
  4 (4.00%) low severe
  4 (4.00%) high mild
  10 (10.00%) high severe

Benchmarking copy_from_slice_u16: Collecting 100 samples in estimated 5.0325 s (71k iterati
copy_from_slice_u16     time:   [70.285 µs 70.848 µs 71.357 µs]
                        change: [−92.103% −92.069% −92.032%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 20 outliers among 100 measurements (20.00%)
  2 (2.00%) high mild
  18 (18.00%) high severe

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.29%. Comparing base (f629ccb) to head (11e49b3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   94.27%   94.29%   +0.01%     
==========================================
  Files           3        3              
  Lines         332      333       +1     
==========================================
+ Hits          313      314       +1     
  Misses         19       19              

☔ 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.

@FreezyLemon FreezyLemon changed the title refactor: copy_from_slice per line refactor: copy_from_slice per row Apr 15, 2026
@shssoichiro
Copy link
Copy Markdown
Member

I'm surprised the compiler wasn't already optimizing this into a memcpy, so good catch.

@shssoichiro shssoichiro merged commit 1bc21a8 into rust-av:main Apr 16, 2026
9 checks passed
@FreezyLemon FreezyLemon deleted the copy-from-slice-per-row branch April 16, 2026 13:32
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