Re: PHP4 Speed Problems

From: Date: Thu, 03 Aug 2000 16:47:19 +0000
Subject: Re: PHP4 Speed Problems
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-9978@lists.php.net to get a copy of this message
At 12:23 PM 8/3/00 -0400, Michael Kimsal wrote:
What kind of scripts are you running that only take 7 milliseconds to run? Are you actually doing anything? ;)
You bet, and probably not the most efficient way. Spamwhack works by comparing new subscriber information to stored profiles of known spammers and abusers. Unfortuntely, I'd rather not disclose the algorithms, for obvious reasons.. It does a lot of fetching from Mysql, comparing, cross-relating.... some statistical functions. I avoid loops wherever possible. Loops have code to manage the loop that isn't necessary if you code "straight line", although the script itself is large.
Any scripts I have that do any appreciable amount of work (database work, file manipulation, etc.) take >40 milliseconds. Just loading a class to do the milliseconds timing takes a bit of time...
I don't use classes. I grab the microtime at the start into $ST_Time and at the end into $ED_Time, and output the difference, if I'm in debug mode, which also turns on a lot more output functions.

« previous php.general (#9978) next »