fast_strstr
boyermoore
fast_strstr | boyermoore | |
---|---|---|
1 | 2 | |
114 | 55 | |
- | - | |
0.0 | 0.0 | |
about 9 years ago | almost 2 years ago | |
C | Go | |
- | MIT License |
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.
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.
boyermoore
-
Boyer-Moore Algorithm is up to 10 times faster than strings.Index for long search terms.
If you want you can check it out at (https://github.com/sarpdag/boyermoore) I made a basic implementation, I hope all works.
-
The Boyer-Moore Fast String Searching Algorithm
I implemented it in Go for fun. I expected Go's standard lib will beat it but it perform around 10 times faster than `strings.Index`.
https://github.com/sarpdag/boyermoore
Go's strings package depends on the substring size tries different approaches like Rabin Karp algorithm, (https://en.wikipedia.org/wiki/Rabin%E2%80%93Karp_algorithm)
What are some alternatives?
rust-memchr - Optimized string search routines for Rust.
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
smart - String Matching Algorithms Research Tool
ripgrep - ripgrep recursively searches directories for a regex pattern while respecting your gitignore
fastsearch - Implements a search algorithm I invented decades ago in 64 bit pascal
kattis - My solutions in Rust and Haskell for select coding challenges on open.kattis.com
kattis
elephant-bird - Twitter's collection of LZO and Protocol Buffer-related Hadoop, Pig, Hive, and HBase code.