note 69271 added to function.array-values
| From: | wellandpowerathotmaildotcom at osu1 dot php dot net | Date: | Tue, 29 Aug 2006 13:34:00 +0000 |
| Subject: | note 69271 added to function.array-values | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116471@lists.php.net to get a copy of this message | ||
I posted a note on a previous post about the array_values_recursive function. I did not see this one
here.
I benchmarked mine and also this one on several data sets of different sizes and different numbers
of loops.
They both used similar memory however mine was slower than this one, by about 10-15%.
So dont use mine, use this one for speed.
To give an example, on an array on my server (it has two dimensions and was a result set from a
mysql query) it took my function:
20.908, 20.971 and 20.976 seconds
and it took this one:
17.500, 17.590 and 17.593
This was over 10,000 itterations of a 20 by 50 grid. So if you are using it just once in your
program you may consider mine more readable for the small difference in time.
Maybe in the future they will give us a function written in C that is even faster!!
----
Server IP: 83.138.144.80
Probable Submitter: 217.41.23.195
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array-values.php
Edit -- https://master.php.net/note/edit/69271
Del: integrated -- https://master.php.net/note/delete/69271/integrated
Del: useless -- https://master.php.net/note/delete/69271/useless
Del: bad code -- https://master.php.net/note/delete/69271/bad+code
Del: spam -- https://master.php.net/note/delete/69271/spam
Del: non-english -- https://master.php.net/note/delete/69271/non-english
Del: in docs -- https://master.php.net/note/delete/69271/in+docs
Del: other reasons-- https://master.php.net/note/delete/69271
Reject -- https://master.php.net/note/reject/69271
Search -- https://master.php.net/manage/user-notes.php