Repository navigation
perf(stdlib): memchr scan cores, native str.count - #284
Merged
Merged
Conversation
- Rust: str.count via memchr find_iter (no split temporaries; frozen edge semantics probed first: empty counts chars+1); find/rfind already delegate to memchr-fast std search - Pure-ZZ split-based count removed (would conflict with native entry) - C: zz_str_count twin + memchr-skip upgrade for contains/find/rfind loops (portable memchr+memcmp, same non-overlap semantics) - Fixture: count edge cases folded into str_find_test (e2e + parity); stdlib.md count row added
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.
Phase 3 of the flash plan. Semantics frozen everywhere (probed first, pinned in fixtures).
Changes
str.countviamemchr::find_iter— no split temporaries; empty-sub counts chars+1 exactly like the split version it replacescountremoved (native entry takes over)zz_str_counttwin + memchr-skip upgrade ofcontains/find/rfindloops (portable memchr+memcmp, same non-overlap semantics)memchr = "2"direct dep (already in lockfile); lockfile updatedcountedge cases folded intostr_find_test(e2e + parity); stdlib.md row addedVerify
zz_stdliblib ✓, clippy + fmt clean