Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55571 invoked from network); 3 Dec 2013 10:42:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Dec 2013 10:42:42 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.180 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.180 mail-we0-f180.google.com Received: from [74.125.82.180] ([74.125.82.180:48532] helo=mail-we0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/B1-46967-1A5BD925 for ; Tue, 03 Dec 2013 05:42:42 -0500 Received: by mail-we0-f180.google.com with SMTP id t61so7509655wes.25 for ; Tue, 03 Dec 2013 02:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3jxClTwgtwIjKfoEgtTA+WiaE4jaCtVkjeyhRKtY00Y=; b=jHeTXq6V/SLoF0u0ynOQDxtDodAD3zUrSVZbE+rOiSulZxVzl821H3dkC4KOOBJyK5 kQidvsZ7RfQD6Bu1RFbWHoBc8pEcx/hg0tFjgPnEU3hZonxXKnYTEpyox9tpEThq6Gji RxI8HgJ+kK8lZEg2Kd0a3dbsJ2HS/dM4VekK+ATdiQBHhbfhD9tTUeezHc/d1XfmAVk2 tVipZhG2e3XRO6VDZWAyAmtl7KyLDi2Iba5GfyWi3/IBbdzLy7nPMtgAfpGCTZdl2ENE wkrOpWKU26xl0CWTHLfooPhYwiPfKZht62IZBAnMb2SCnaZCtcwvOtj89vEVEYUJDi3c IlWA== MIME-Version: 1.0 X-Received: by 10.180.210.130 with SMTP id mu2mr1697569wic.61.1386067358935; Tue, 03 Dec 2013 02:42:38 -0800 (PST) Received: by 10.227.7.2 with HTTP; Tue, 3 Dec 2013 02:42:38 -0800 (PST) Received: by 10.227.7.2 with HTTP; Tue, 3 Dec 2013 02:42:38 -0800 (PST) In-Reply-To: <1734470932732186750@unknownmsgid> References: <529D1197.5000305@nebm.ist.utl.pt> <8BCA5A38-788B-4E6A-A6AC-1A8DCBA3D8D9@zend.com> <759ccd0f06663defc84ffee473b51210@mail.gmail.com> <1386064737.2637.8.camel@smugmug> <1734470932732186750@unknownmsgid> Date: Tue, 3 Dec 2013 11:42:38 +0100 Message-ID: To: Zeev Suraski Cc: Dmitry Stogov , Andi Gutmans , PHP Internals , Hannes Magnusson , Gustavo Lopes , Mike , Gadi Goldbarg , Laruence Content-Type: multipart/alternative; boundary=001a11c26a84907e4504ec9ef4f0 Subject: Re: [PHP-DEV] strtr() performance degradation From: pierre.php@gmail.com (Pierre Joye) --001a11c26a84907e4504ec9ef4f0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Dec 3, 2013 11:28 AM, "Zeev Suraski" wrote: > > On 3 =D7=91=D7=93=D7=A6=D7=9E 2013, at 11:59, Mike wrote: > > > On Tue, 2013-12-03 at 10:29 +0200, Zeev Suraski wrote: > > > > Hi! > > > >> We've all experienced first-hand what a complete rewrite of a very popular > >> piece of code can do, and the fact that compatibility can be broken not just > >> by changing behavior, but also by radically changing the algorithm in a way > >> that produces very negative performance side effects. > > > > What popular piece of code are you referring to? > > strtr(). The algorithm change resulted in a ~10x slowdown for short > simple cases, and given its popularity in PHP apps - that translated > to a ~12% slowdown in real life performance. As I agree on the issue, I would really like to see which apps you use to test and how, as well as the numbers. Cheers, --001a11c26a84907e4504ec9ef4f0--