Re: array speed

From: Date: Thu, 05 Apr 2001 19:45:47 +0000
Subject: Re: array speed
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-47316@lists.php.net to get a copy of this message
let me be more clear about the microtime() - do something like: <? $start = microtime(); while(list($key,$val) = each($array)) { // do something } $end = microtime(); echo "It took ".($end - $start)." microseconds do loop through the array.\n"; ?> --Joe On Thu, Apr 05, 2001 at 02:43:40PM -0500, Joe Stump wrote: > You can do some test with microtime() and see how long it takes. 350 elements > isn't really a large array. I've seen PHP chew through arrays of 250k plus in > only a second or so. It will take longer for 350 elements to be shoved out to > the output buffer than it would to actually loop through it. > > --Joe > > On Thu, Apr 05, 2001 at 10:41:10PM +0300, Rouvas Stathis wrote: > > I wouldn't worry about that. Although it all depends by what do you mean > > by "speed":-) > > Anyway, you can always test your page with "ab" (part of the Apache > > installation, at least on Linux) > > -Stathis. > > > > Kurth Bemis wrote: > > > > > > i'm concerned about the speed at which httpd (with php4.0.1pl1 compiles in > > > as a static mod) can "chew" through a 350 element 2d array. Can anyone > > > offer any information? > > > > > > ~kurth > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > /******************************************************************************\ > * Joe Stump - PHP/SQL/HTML Developer * > * http://www.care2.com - > http://www.miester.org - > http://gtk.php-coder.net * > * "Better to double your money on mediocrity than lose it all on a dream." * > \******************************************************************************/ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/

« previous php.general (#47316) next »