🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6086

Re: pattern matching

#6086
From: Joe Huffman
Date: Tue, 07 May 1991 15:49
15 lines
1023 bytes
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
Technical Details
Message-ID: <1991May07.154956.13646@proto.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!proto!joe
References: <1991May6.160733.10509@umbc3.umbc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!proto!joe
From: joe@proto.com (Joe Huffman)
Newsgroups: comp.os.msdos.programmer
Subject: Re: pattern matching
Message-ID: <1991May07.154956.13646@proto.com>
Date: 7 May 91 15:49:56 GMT
References: <1991May6.160733.10509@umbc3.umbc.edu>
Distribution: usa
Organization: Prototronics @ Sandpoint, Idaho
Lines: 15