arguments[0] === undefined VS arguments.length === 0

JavaScript performance comparison

Test case created by avetisk

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
arguments[0] === undefined
(function (a, b, c) {
  if (arguments[0] === undefined) {
    return true;
  }
  return false;
})();
pending…
arguments.length === 0
(function (a, b, c) {
  if (arguments.length === 0) {
    return true;
  }
  return false;
})();
pending…
! arguments.length
(function (a, b, c) {
  if (! arguments.length) {
    return true;
  }
  return false;
})();
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