Skip to content

Comment on Why GNU grep is Fastparent

Comments

If you think Boyer-Moore is trippy, try to understand the partial match lookup table creation algorithm in Knuth-Morris-Pratt: http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pr...

They're about the same amount of trippiness. Boyer-Moore makes the same kind of jump table, except Boyer-Moore starts comparing at the end of the search string.

linked from that wikipedia page, an applet showing them side-by-side, you will need java, and you have to supply your own test strings.

http://www.ics.uci.edu/~goodrich/dsa/11strings/demos/pattern...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.