Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36436 invoked from network); 9 Jun 2008 13:27:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Jun 2008 13:27:05 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 193.227.246.108 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 193.227.246.108 ip246-108-v193.static.x-ip.net Received: from [193.227.246.108] ([193.227.246.108:40654] helo=lovelace.midden.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/79-21959-8AF2D484 for ; Mon, 09 Jun 2008 09:27:05 -0400 Received: from office.vbulletin.com ([217.155.246.60] helo=[10.0.0.116]) by lovelace.midden.org.uk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1K5hOc-0002cx-NT; Mon, 09 Jun 2008 14:27:00 +0100 Message-ID: <484D2F94.7090106@macvicar.net> Date: Mon, 09 Jun 2008 14:26:44 +0100 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Michal Dziemianko CC: internals@lists.php.net References: <7E62CA6E-83F4-4F9C-86FB-75EBE7D489C9@gmail.com> In-Reply-To: <7E62CA6E-83F4-4F9C-86FB-75EBE7D489C9@gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -4.2 X-Spam_Report: Spam detection software, running on the system "lovelace.midden.org.uk", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Michal, Everything looks fine here and it applies cleanly, do you think you could make a patch against HEAD with this as well? I suspect it will be different due to Unicode. Scott [...] Content analysis details: (-4.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.1 TW_RR BODY: Odd Letter Triples with RR 0.0 NORMAL_HTTP_TO_IP URI: Uses a dotted-decimal IP address in URL -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.1 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] Algorithm Optimizations - string search From: scott@macvicar.net (Scott MacVicar) Hi Michal, Everything looks fine here and it applies cleanly, do you think you could make a patch against HEAD with this as well? I suspect it will be different due to Unicode. Scott Michal Dziemianko wrote: > Hello, > Here: http://212.85.117.53/DIFF.txt is small patch that will speed up > following functions: > strpos, > stripos, > strrpos > strripos, > and probably some others (all that use zend_memnstr/php_memnstr function) > > The speedup of zend_memnstr is about 8% on average (about 30% in case of > artificial strings). > Functions strrpos and strripos are about 25% faster on average. > > The only drawback - it needs some additional space (size of the needle). > > All functions pass all the tests. > > If it looks fine than I will apply for cvs account. > > Cheers, > Michal