arguments to array

JavaScript performance comparison

Test case created by dipser

Preparation code

<script>
  var f1 = function() {
   [].slice.call(arguments);
  };
 
  var f2 = function() {
   Array.prototype.slice.call(arguments);
  };
</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
f1
f1(1, 2, 3, 4, 5);
pending…
f2
f2(1, 2, 3, 4, 5);
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