Re: PHP function speed testing

From: Date: Mon, 26 Jul 2004 03:38:00 +0000
Subject: Re: PHP function speed testing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191862@lists.php.net to get a copy of this message
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." */

« previous php.general (#191862) next »