Comment on Why GNU grep is FastparentComments−Daishiman16yIf 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...−mhansen16yThey'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.−jacquesm16ylinked 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...
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...