bench: add memchr vs scalar comparison for #718 - #1014
Open
dhimasardinata wants to merge 2 commits into
Open
Conversation
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
Collaborator
|
Name the file / bench |
Address dralley review on tafia#1014: name file/bench simd_vs_scalar not issue718
Author
|
Renamed per review: |
|
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #718, #405
Adds
benches/issue718.rsto reproduce scalar vs SIMD gap from memchr_vs_stringzilla table in #718:This bench uses existing
sample_rss.xml:194K x20and compares:iter.position(|&b| matches!(b, <>&'"\r))(old _escape)2x memchr3(new SIMD accelerated escape routines #405 impl)Run:
cargo bench --bench issue718 -- --sample-size 10Provides baseline for #405 and future stringzilla/AVX-512 exploration without adding C++ dep. Can extend to stringzilla-rs binding later.