Re: cvs: php4 / NEWS /ext/standard string.c
| From: | Sascha Schumann | Date: | Sat, 21 Jul 2001 03:25:40 +0000 |
| Subject: | Re: cvs: php4 / NEWS /ext/standard string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-6300@lists.php.net to get a copy of this message | ||
> Yes it is difficult to tell because it is not only a function of the length
> of the pattern but also a function of what characters and sub-strings have
> a tendency to repeat themselves and what sub-strings you are likely to
> search for. Actually the latter is what ends up effecting if a long or
> short pattern is more efficient.
I think I might drop Boyer-Moore alltogether. While looking
for Smit's paper on BM, I found various papers concerning
advancements in this area. A report by Baeza-Yates[92]
describes a Shift-Or algorithm which is superior to BM in
almost any case while being of less complexity. I'm
currently reading Navarro[98] which claims to combine the
aspects of various algorithms while being even simpler to
implement.
Baeza-Yates, 1992, A New Approach to Text Searching
Navarro, 1998, Fast and Flexible String Matching by Combining
Bit-parallelism and Suffix Automata
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg