[].map.call vs Array.prototype.map.call

Benchmark created on


Setup

var noPrototype = function() {
    return [].map.call(arguments, function(name) {
      return name;
    });
  }
  
  var prototype = function() {
    return Array.prototype.map.call(arguments, function(name) {
      return name;
    });
  }

Test runner

Ready to run.

Testing in
TestOps/sec
[].map.call
noPrototype('foo', 'bar', 'baz');
ready
Array.prototype.map.call
prototype('foo', 'bar', 'baz');
ready

Revisions

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