Chain vs Call vs Func

Benchmark created by Chain vs Call vs Func on


Setup

var sort = Array.prototype.sort;
  var sort_func = (arr) {
  	return Array.prototype.sort.call(arr);
  }
  
  var arr = [];
  
  for (var i = 0; i < 10000; i++) {
  arr.push(i);
  }

Test runner

Ready to run.

Testing in
TestOps/sec
Call
sort.call(arr);
ready
Func
sort_func(arr);
ready

Revisions

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

  • Revision 1: published by Chain vs Call vs Func on