arguments-woes

JavaScript performance comparison

Revision 8 of this test case created

Preparation code

<script>
  function f() {
    return (typeof arguments[0] === 'undefined') ? 0 : 1;
  }


  function h() {
    return (arguments.length > 0) ? 0 : 1;
  }
  function g(x) {
    return (typeof x === 'undefined') ? 0 : 1;
  }
</script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
missing argument check via arguments
f(); f(1);
pending…
missing argument check via named arg
g(); g(1);
pending…
my own
h(); h(1);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment