Hacker News new | ask | show | jobs
by MattPalmer1086 426 days ago
No problem, hope it was useful.

I've found a lot of real world performance comes from doing as little as possible inside the main search loop.

UPDATE: It's often the case that a simpler algorithm outperforms a theoretically better one. For example, you are using Boyer Moore Horspool, which is the simpler cousin of the original Boyer Moore. BM can get better shifts than Horspool, but it's often slower in practice.