On Monday 26 July 2004 06:21, Shawn McKenzie wrote:

> O.K.  So I've written my application and debugged it, and now I want to
> try and optimize the speed.  I have written a little test script to test
> the time of each PHP function that I can use in a certain situation
> (ereg, eregi, strpos).  Problem is, no matter what I do, the first
> function I test in the script is always the slowest, even if I reorder
> them so that strpos() is first instead of ereg().  Doesn't matter which
> one it is.  Maybe I did something stupid and just can't see it?  Below
> is the code:

Break out each test into separate programs. Also you may need to run each 
program multiple times and take the average to even out the effects of disk 
cache, memory cache and other vagaries.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
QOTD:
        "I thought I saw a unicorn on the way over, but it was just a
        horse with one of the horns broken off."
*/

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

Reply via email to