Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70489 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53854 invoked from network); 3 Dec 2013 10:28:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Dec 2013 10:28:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=zeev@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=zeev@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 209.85.220.169 cause and error) X-PHP-List-Original-Sender: zeev@zend.com X-Host-Fingerprint: 209.85.220.169 mail-vc0-f169.google.com Received: from [209.85.220.169] ([209.85.220.169:37607] helo=mail-vc0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CA/51-46967-B42BD925 for ; Tue, 03 Dec 2013 05:28:27 -0500 Received: by mail-vc0-f169.google.com with SMTP id hu19so9513070vcb.14 for ; Tue, 03 Dec 2013 02:28:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:from:mime-version:in-reply-to:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=WipsiXFo4wDKFMhUs9JNl6LTVsJang2qQDQnj1MzZw0=; b=PehravR0t2Z7fmqKH1y8vzHapLLwZvET0+93xt+soBbhXk0GZsN48SEQ4eXX2UVxFA pbwzhlSsaTcc8FSjN+1BXOdAVfK5uQtH/9n3D22EXtWiK0e4smRuM0zwHnd2XnoMCXBZ 7ybYdyVtvmUKcY6MF0J6D4PmKzIyFNc3MoyYxVU/SFLqNvmUVXCunGnd5MKSKa6cBvV3 ZsWaufgqF+wNaT2J+yfqZkIth3DOI8qMDN+KwtPh8AxiBNtShdZR3HQ5o17AcHy7nsSj 1RGvsAqrkJcLE/cmbfuoXDK4igC5YHU2bAfMpsurn6tZjNlb6AVUT56udoVMqoGk8Sej sggg== X-Gm-Message-State: ALoCoQlAlsfwrhRgIQKR7N3GcJ1TuHfi9DmFGDmmmY54W3PfaFeE343IJKqRjueRrMGIV+aT3QpcTljlsI900Pq9toaGPs6tBNUmTt5ppFq57YMAC5yGbURXiosHsyAhuHq7tsLQ1GoW X-Received: by 10.220.58.1 with SMTP id e1mr55788311vch.0.1386066504373; Tue, 03 Dec 2013 02:28:24 -0800 (PST) References: <529D1197.5000305@nebm.ist.utl.pt> <8BCA5A38-788B-4E6A-A6AC-1A8DCBA3D8D9@zend.com> <759ccd0f06663defc84ffee473b51210@mail.gmail.com> <1386064737.2637.8.camel@smugmug> Mime-Version: 1.0 (1.0) In-Reply-To: <1386064737.2637.8.camel@smugmug> Date: Tue, 3 Dec 2013 12:28:24 +0200 Message-ID: <1734470932732186750@unknownmsgid> To: Mike Cc: Hannes Magnusson , Andi Gutmans , Gustavo Lopes , Laruence , Dmitry Stogov , PHP Internals , Gadi Goldbarg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] strtr() performance degradation From: zeev@zend.com (Zeev Suraski) 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 popul= ar >> 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. Zeev