Hi Gustavo,

I didn't look into the code yet (and really don't like to do it), but we
just noticed terrible performance degradation of strtr() function between
5.4.11 and 5.4.15 coming probably after your changes.

$ cat strtr.php
<?php
function foo() {
    for ($i = 0; $i < 100000; $i++) {
        strtr("abcdefgh", array("a"=>"11", "g"=>"22"));
    }
}
foo();

$ time sapi/cli/php.5.4.11 strtr.php

real    0m0.082s
user    0m0.071s
sys    0m0.010s

$ time sapi/cli/php.5.4.15 strtr.php

real    0m0.594s
user    0m0.584s
sys    0m0.007s


7 times slower :(

Could you place take a look.

Thanks. Dmitry.

Reply via email to