[PHP] how to make for statement run faster

2009-03-20 Thread Andrew Williams
I have a program where I process more that 5000 list of 100 data at  time
but it very slow due to many  *for statement*s. how you make it run faster

-- 
best
www.willandy.co.uk


Re: [PHP] how to make for statement run faster

2009-03-20 Thread Virgilio Quilario
 I have a program where I process more that 5000 list of 100 data at  time
 but it very slow due to many  *for statement*s. how you make it run faster

code for statements to use a variable or contant for testing in every
iteration like below
for ($i = 0; $i  100; $i++) {}

also try to optimize the operations inside the for loop.
or maybe better to post snippets.

Virgil
http://www.jampmark.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to make for statement run faster

2009-03-20 Thread Shawn McKenzie
Andrew Williams wrote:
 I have a program where I process more that 5000 list of 100 data at  time
 but it very slow due to many  *for statement*s. how you make it run faster
 

Without seeing the code I would have to say optimize the code.


-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php