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

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

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

Ladwein's pure PHP (array_* functions)
maximum occuring value is : 1
time elapsed = 0.00191 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