smart
fast_strstr
smart | fast_strstr | |
---|---|---|
6 | 1 | |
94 | 114 | |
- | - | |
0.0 | 0.0 | |
about 2 months ago | about 9 years ago | |
JavaScript | C | |
GNU General Public License v3.0 only | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
smart
-
Faster IndexOf for Substrings in .NET
You can of course browse the source on GitHub: https://github.com/smart-tool/smart/tree/master/source
The tarballs are just a feature of GitHub, not something they specifically release.
-
linear-time, constant-space, fast substring-searching
Or just use one the fast strstr implementations. The current leader is EPSM https://smart-tool.github.io/smart/
-
The Boyer-Moore Fast String Searching Algorithm
In the libc's not, indeed. They are still in the stoneage of string search.
But the fastest is currently EPSM, by S. Faro and O. M. Kulekci. See https://smart-tool.github.io/smart/
"Exact Packed String Matching" optimized for SIMD SSE4.2/AVX (x86_64 and aarch64). It performs stable and best on all sizes.
The site I linked to compares 199 fast string search algorithms, with the usual ones (BM, KMP, BMH) being pretty slow. EPSM outperforms all the others being mentioned here on these platforms. It's also the latest.
-
Made a search algorithm, send help.
At the moment the numbers for average and worst case show the time increasing from ~4 miliseconds to ~8 as the query increases size from 8 characters to 4000+ over these texts. In the best case it matches or exceeds all other algorithms I've tested it against.
fast_strstr
-
The Boyer-Moore Fast String Searching Algorithm
https://github.com/RaphaelJ/fast_strstr/tree/master/benchmar...
While the algorithm is time linear (Boyer-Moore is sub linear), it ends up being significantly faster on textual content as the per character operations are significantly simplier.
What are some alternatives?
boyermoore - Implementation of Boyer-Moore fast string search algorithm in Go
rust-memchr - Optimized string search routines for Rust.
ripgrep - ripgrep recursively searches directories for a regex pattern while respecting your gitignore
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
fastsearch - Implements a search algorithm I invented decades ago in 64 bit pascal