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.12398 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.01597 ms
original unsorted array (dimension=7) :
[snip data]
Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 1.0519 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.02003 ms
original unsorted array (dimension=7) :
[snip data]
Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 9.81712 ms
maximum occuring values (2 occurences) are : 1 4
Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.01693 ms
done.
for European Experts Exchange and Edaìn Works back to list of test scripts
Last update 2009-10-30 09:20:39
| Add This Article To: |
Del.icio.us |
Digg |
Google |
Spurl |
Blink |
Furl |
Simpy |
Y! MyWeb |