[comp.os.msdos.programmer] pattern matching

joe@proto.com (Joe Huffman) (05/07/91)

cs106132@umbc5.umbc.edu (cs106132) writes:

>does anyone have a fast pattern matching algo?  I am using good old slide one
>over routine, but it is so SLOW. Any help will be appreciated.

Assuming that you mean an exact match and also assuming you aren't writing 
in 'C' or 'C++' where you would have 'strstr()' available...

Try looking in Robert Sedgewick's book "Algorithms".  I implemented the
Zortech library's strstr() from this book (with some tweaks for more speed)
and it compared quite favorably to several other versions of strstr() that
I had obtained for comparision.

-- 
joe@proto.com