Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67631 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34557 invoked from network); 4 Jun 2013 23:38:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jun 2013 23:38:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:39478] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9B/31-22227-D5A7EA15 for ; Tue, 04 Jun 2013 19:38:07 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id E935670003E2; Wed, 5 Jun 2013 00:38:01 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id xHA1c91LmzF4; Wed, 5 Jun 2013 00:38:01 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id AD3D770003C8; Wed, 5 Jun 2013 00:38:01 +0100 (WEST) Received: from damnation.nl.lo.geleia.net (a80-101-138-144.adsl.xs4all.nl [80.101.138.144]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 36A912004F9F; Wed, 5 Jun 2013 00:37:56 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Dmitry Stogov" Cc: "PHP Internals" , "Zeev Suraski" , "Gadi Goldbarg" References: Date: Wed, 05 Jun 2013 01:37:53 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/12.15 (Linux) Subject: Re: strtr() performance degradation From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Tue, 04 Jun 2013 22:12:41 +0200, Dmitry Stogov wrote: > This "good" algorithm that doesn't work well for "worse" cases makes > about 15% slowdown of ZF2 based applications. > It also slowdowns wordpress and other apps, but not so significantly. > > It's definitely doesn't work well for real-life applications :( > Something must be dome (e.g. usage of old or new algorithms depending on > different argument patterns). > All right, I'll take a look at what can be done. It's quite possible we can even do better than the old algorithm for short texts, but falling back to it in those cases is always an option. -- Gustavo Lopes