edainworks.com :: VGR :: comparison of various max-occuring-value extracting methods .
original unsorted array (dimension=7) :
element 0 : value 1
element 1 : value 1
element 2 : value 2
element 3 : value 3
element 4 : value 4
element 5 : value 4
element 6 : value 5
Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 0.37503 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.04005 ms
original unsorted array (dimension=7) :
[snip data]
Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 3.07178 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.03386 ms
original unsorted array (dimension=7) :
[snip data]
Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 30.70116 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.04697 ms
done.
for European Experts Exchange and Edaìn Works back to list of test scripts
Last update 2009-10-30 09:20:39
Copyright(©)(c) the respective authors. Licensed under the Creative Commons Attribution Share Alike 3.0 License
.
These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!