PHP 4.0 Bug #7113 Updated: count and pointers

From: Date: Tue, 23 Jan 2001 00:28:25 +0000
Subject: PHP 4.0 Bug #7113 Updated: count and pointers
Groups: php.dev 
Request: Send a blank email to php-dev+get-44757@lists.php.net to get a copy of this message
ID: 7113 Updated by: sterling Reported By: wico@cnh.nl Old-Status: Open Status: Closed Bug Type: Performance problem Assigned To: Comments: no, it shouldn't--in php yes it should, php4 is pretty smart about this though. Objects are the only thing where speed increases by pass-by-reference. otherwise its slower. But you shouldn't be using references as an optimization anyway... Previous Comments: --------------------------------------------------------------------------- [2000-10-10 04:45:19] wico@cnh.nl Hiya $ADLIB_FILE is a file, size = 9mb $ADLIB_DATA = file($ADLIB_FILE); $ADLIB_COUNT = count($ADLIB_DATA); echo time() - $test . " seconden<BR>nn"; die(); takes 17 secs $ADLIB_DATA = file($ADLIB_FILE); $ADLIB_COUNT = count(&$ADLIB_DATA); echo time() - $test . " seconden<BR>nn"; die(); this takes 27 secs? shouldn't this be faster the the first one? Greetz, Wico --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7113

« previous php.dev (#44757) next »