Re: strtr() performance degradation

From: Date: Tue, 03 Dec 2013 10:42:38 +0000
Subject: Re: strtr() performance degradation
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-70490@lists.php.net to get a copy of this message
On Dec 3, 2013 11:28 AM, "Zeev Suraski" <zeev@zend.com> wrote: > > On 3 בדצמ 2013, at 11:59, Mike <mike.php.net@gmail.com> 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,

« previous php.internals (#70490) next »