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.04292 ms
maximum occuring values (2 occurences) are : 1 4

Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.00906 ms

original unsorted array (dimension=7) :
[snip data]

Instantaneous sort + search for max occurence
first maximum occuring value is : 1 (2 times)
time elapsed = 0.3159 ms
maximum occuring values (2 occurences) are : 1 4

Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.00215 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.20196 ms
maximum occuring values (2 occurences) are : 1 4

Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.00381 ms

done.

Vincent Graux (VGR) for European Experts Exchange and Edažn Works  back to list of test scripts
Last update 2024-05-13 15:36:19