View Single Post
Old 2005-05-13, 03:48 PM   #8
Barron
You tried your best and you failed miserably. The lesson is 'never try'
 
Join Date: Oct 2004
Posts: 166
Your right, I may end up changing the routine to a nested loop of some kind to catch the end of the list.

Your example brings to mind something I've been wanting to ask someone for a long time.

I read a post on php.net about 2 years ago I think, where some guy benchmarked, do, for, foreach and while. The slowest was for when it came to speed and do being the fastest. If I remember correctly do is 60% faster than for. Since then, I stopped using for statements unless dealing with very small arrays. I try to trim off any excess load that I can.

Have you noticed any speed difference between any of these?


-
Barron is offline   Reply With Quote