Comment

Comment by MattPalmer1086

Boyer Moore is OK, but there are better algorithms available. The simpler Horspool variant is usually a fair bit faster and also easier to implement. For short strings, e.g. less than 12 character, the ShiftOr algorithm is hard to beat. I've spent quite a bit of time writing and profiling different search algorithms as part of the byteseek project on GitHub. Let me know if you'd like details on other possible options.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton