|
Posted by Chung Leong on 10/18/06 21:42
Sonnich wrote:
> Hi
>
> I have a costum function for a special search, which sort strings.
>
> This is currently the place where I can save a lot of time (~70%) if
> possible.
>
> So, which is faster:
>
> for($j = 0;$j<count($array);$j++)
> or
>
> $j = 0
> while($j<count($array))
> $j++;
>
> (well, I know that counting down is faster, so...
>
> $j = count($array)-1;
> while($j>=0)
> $j--;
> )
They're both slow. foreach() is the fastest.
Navigation:
[Reply to this message]
|