Re: [PATCH] String function optimizations
| From: | Ilia A. | Date: | Fri, 04 Oct 2002 03:24:56 +0000 |
| Subject: | Re: [PATCH] String function optimizations | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-88996@lists.php.net to get a copy of this message | ||
Small correction to the original patch, fixes a segv in sybase-style
addslashes code as well as removes unused variable.
Ilia
On October 3, 2002 10:21 pm, Ilia A. wrote:
> After doing a number of tests on PHP's various string functions, I've came
> up with a patch that significantly improves the performance on those
> functions. The patch optimizes:
> php_addslashes() - internal PHP function used to add slashes to a string
> (15-20% speed increase)
> php_memnstr() - internal PHP function used to find a multibyte string
> inside another string. 35-40% speed increase when string is found, 90-100%
> speed increase when the string is not found.
> substr_count() - PHP function used to determine the number of times a
> string occurs within another string. 20-25% speed increase + additional
> speed gains from usage of optimized php_memnstr() function.
>
> Please let me know if there are any objections, better suggestions, bug
> reports (pertaining to this patch) that would need to be resolved before
> this bug goes into the CVS.
>
> Ilia
Attachment: [text/x-diff] string.patch
Attachment: [text/x-diff] string.patch