Math.maxing

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.max
for (var i = 0; i < 1000000; i++) a = Math.max(34, 56);
pending…
?
for (var i = 0; i < 1000000; i++) a = 34 > 56 ? 34 : 56;
pending…
if
for (var i = 0; i < 1000000; i++) if (34 > 56) {
  a = 34
} else {
  a = 56
};
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