-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
The main context for this is well described by BurntSushi/memchr#156.
I think (in rough order of impact) we should:
- switch from
str.containsto memchr - switch from
str.starts_withto to hopefullymemchr, otherwisequick_strings::starts_with- there's no "what if the haystack is very long" concern since we're looking at the start of the string, so the difference betweenmemchrandquick_stringswon't be as big, or even might be negative - switch from using
starts_with_ignore_ascii_casetoquick_strings::istarts_with - same for
*ends_with - switch from Regex to use
quick_strings::icontains(copying the code) forILIKE- maybe we have to check it's actually faster for large haystacks? - this might have the biggest impact in some scenarois, but me should be careful - to use those improvements, switch from some direct use of
str.containsetc inlike.rsto usePredicate
(I'm not suggesting that we make quick_strings a dependency, it was just a scratch experiment, if we use any of that code we should copy it.
paddyhoran, XiangpengHao, Dandandan, alamb and tshauck
Metadata
Metadata
Assignees
Labels
No labels