I am running a php script (locally) which runs through a loop several hundred times. Each time through the loop the same computation is done with the exception of two input variables being different. The input variables are obtained with a MySQL query based on the counting variable in the loop.
I used to run this program on an Ubuntu machine. The first iteration would take about 1 minute and each subsequent iteration took about 10 seconds. Now, on my Mac, each iteration takes the full minute. My guess would be that this has something to do with how Ubuntu managed the script in cache. I'm running PHP5, MySQL 5 and Apache 2.
Does anybody know how to make modifications to either my script or to my machine to store the program in cache?
Let me know if you need more info, and thanks.