Welcome Guest, Not a member yet? Register   Sign In
Things that affect our applications' performance
#4

[eluser]Seppo[/eluser]
Just a quick notice about that page (I have never seen it before)

Code:
foreach ($items as $name => $value)
{
    if (strpos($str, $name) !== FALSE)
    {
        str_replace($name, $value, $str);
    }
}
does not look optimal, as the guidelines say. If the string is not found, I'm still getting worst results...

And also,
Code:
$str = str_replace(array_keys($items), array_values($items), $str);
is at least two times faster...


Messages In This Thread
Things that affect our applications' performance - by El Forum - 06-29-2008, 05:57 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 07:51 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 09:07 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 09:21 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 09:42 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 11:42 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 11:56 AM
Things that affect our applications' performance - by El Forum - 06-29-2008, 01:38 PM
Things that affect our applications' performance - by El Forum - 06-29-2008, 03:40 PM
Things that affect our applications' performance - by El Forum - 06-29-2008, 03:46 PM
Things that affect our applications' performance - by El Forum - 06-29-2008, 05:11 PM
Things that affect our applications' performance - by El Forum - 06-29-2008, 05:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB