[PATCH] array_pop and array_shift (#16063, #16068)

From: Date: Tue, 30 Jul 2002 07:12:12 +0000
Subject: [PATCH] array_pop and array_shift (#16063, #16068)
Groups: php.dev 
Request: Send a blank email to php-dev+get-86326@lists.php.net to get a copy of this message
Along with fixing this bugs (16063 and 16068) I signifintly increased the preformance of array_pop and array_shift. Here are some times on a 1.2ghz athlon. <? $t = array_fill(0, $size, "test"); for($i = 0;$i < $size;$i++) array_pop($t); ?> Before: $size = 2000; //1.633s $size = 4000; //8.942s $size = 6000; //24.005s $size = 10000; //1m13.986s After: $size = 2000; //0.050s $size = 4000; //0.060s $size = 6000; //0.081s $size = 10000; //0.090s I still would like to see the functions array_unshift, array_splice and array_pad looked into to increase preformance too. I thought i had karma but it seems i don't. So can someone ither give me the karma or patch it themselves. -brad __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com

« previous php.dev (#86326) next »