Hacker News new | ask | show | jobs
by sarpdag 1887 days ago
I implemented it in Go for fun. I expected Go's standard lib will beat it but for long substring searches it perform up to 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)