Re: cvs: php4 / NEWS /ext/standard string.c
| From: | Sascha Schumann | Date: | Fri, 20 Jul 2001 19:38:15 +0000 |
| Subject: | Re: cvs: php4 / NEWS /ext/standard string.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-6289@lists.php.net to get a copy of this message | ||
On Fri, 20 Jul 2001, Andrei Zmievski wrote:
> On Fri, 20 Jul 2001, Sascha Schumann wrote:
> > There are a lot cases where the old algorithm is faster (and
> > there are cases where Boyer is 3x times faster). Thus it is
> > not really practical to remove the current implementation.
>
> How would the user know in which cases to use Boyer-Moore?
There is a simple rule: The longer the pattern, the more
efficient the algorithm becomes. I've experimented with
some code which automatically determines which algorithm
to use, but I have not found a convincing way yet. The old
naive implementation is faster than I anticipated.
- Sascha Experience IRCG
http://schumann.cx/ http://schumann.cx/ircg