gagolews / gagolews/stringi

stri_replace_fixed speedup if pattern_nbytes == replacement_nbytes

Open
#142 2 comments 0 reactions 1 assignee Claimed by @gagolews View on GitHub
enhancement low priority
Dominant language
C++
Stars
318
Forks
48
PR merge metrics
No merged PRs in 30d

Description

If we know that a pattern's length is the same as the replacement string's length (in bytes, case_sensitive only), then a replacement OP can be performed much faster.
1. memcpy all
2. re-write all matches

Only upgrades in `String8buf::replaceAllAtPos` are needed

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.