Re: strtr() performance degradation
| From: | Zeev Suraski | Date: | Tue, 03 Dec 2013 10:28:24 +0000 |
| Subject: | Re: strtr() performance degradation | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70489@lists.php.net to get a copy of this message | ||
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.
Zeev