max

JavaScript performance comparison

Test case created

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Math
function one(grades) {
 return Math.max.apply(null, grades)
}

grades = [2, 54, 3535, 34, 34, 5, 1, 6, 23, 36, 1, 5, 2, 6,1 1, 5, 1535];
pending…
Sort
function two(grades) {
 return grades.sort(function(a, b) { return b - a } )[0];
}

grades = [2, 54, 3535, 34, 34, 5, 1, 6, 23, 36, 1, 5, 2, 6,1 1, 5, 1535];
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment