Re: [PHP4BETA] reset and count terribly slow on big arrays .. sizeof is fast
| From: | thies at digicol dot de | Date: | Wed, 19 Jan 2000 12:22:32 +0000 |
| Subject: | Re: [PHP4BETA] reset and count terribly slow on big arrays .. sizeof is fast | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-9285@lists.php.net to get a copy of this message | ||
On Wed, Jan 19, 2000 at 12:48:47PM +0100, Stefano Bagnara wrote:
> i got an array of 5000 arrays.
>
> reset($bigarray) takes 90 seconds !!!!
> count($bigarray) takes 6 seconds !!
> sizeof($bigarray) takes less than a second
>
> what does it mean?? i now changed all of my count in sizeof and my scripts
> are really faster now.
you not using php4!
in php3 the argument to count() would be copied internally, in 4.0b this is no longer the case!
plz do not post php3 related issues to the php4 list.
thanx,
tc
>
> - stefano bagnara (data sail s.r.l.) [bago.org]
>
>
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
>
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany