Skip to content

bench: add memchr vs scalar comparison for #718 - #1014

Open
dhimasardinata wants to merge 2 commits into
tafia:masterfrom
dhimasardinata:perf/bench-718
Open

bench: add memchr vs scalar comparison for #718#1014
dhimasardinata wants to merge 2 commits into
tafia:masterfrom
dhimasardinata:perf/bench-718

Conversation

@dhimasardinata

Copy link
Copy Markdown

Related to #718, #405

Adds benches/issue718.rs to reproduce scalar vs SIMD gap from memchr_vs_stringzilla table in #718:

Intel forward Intel reverse Arm forward
memchr 5.89 GB/s 1.08 GB/s 6.38
stringzilla 8.37 8.21 6.56

This bench uses existing sample_rss.xml:194K x20 and compares:

Run: cargo bench --bench issue718 -- --sample-size 10

Provides baseline for #405 and future stringzilla/AVX-512 exploration without adding C++ dep. Can extend to stringzilla-rs binding later.

Provides benchmark from tafia#718 table: memchr 5.89 GB/s vs stringzilla 8.37 GB/s (Intel forward), 1.08 vs 8.21 reverse.
This bench reproduces scalar iter.position vs SIMD memchr3 for escape 6-char case using sample_rss.xml:194K x20.
Run: cargo bench --bench issue718 -- --sample-size 10
Related: tafia#405 escape SIMD, tafia#718 stringzilla
@dralley

dralley commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Name the file / bench simd_vs_scalar bench or something, not issue718

Address dralley review on tafia#1014: name file/bench simd_vs_scalar not issue718
@dhimasardinata

Copy link
Copy Markdown
Author

Renamed per review: benches/issue718.rs -> benches/simd_vs_scalar.rs and bench name simd_vs_scalar. Thanks!

@Mingun Mingun added enhancement optimization Issues related to reducing time needed to parse XML or to memory consumption labels Aug 31, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 56 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.00%. Comparing base (e00ae5c) to head (e76e904).
⚠️ Report is 74 commits behind head on master.

Files with missing lines Patch % Lines
benches/simd_vs_scalar.rs 0.00% 56 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1014      +/-   ##
==========================================
- Coverage   57.31%   55.00%   -2.32%     
==========================================
  Files          46       52       +6     
  Lines       18197    18847     +650     
==========================================
- Hits        10429    10366      -63     
- Misses       7768     8481     +713     
Flag Coverage Δ
unittests 55.00% <0.00%> (-2.32%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

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

Labels

enhancement optimization Issues related to reducing time needed to parse XML or to memory consumption

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants