cache function name

Benchmark created by urbeller on


Test runner

Ready to run.

Testing in
TestOps/sec
Direct call
function fn() {
  var aa = Array.prototype.slice.call(arguments);

}
ready
Cache function pointer
function fn() {
  var unboundSlice = Array.prototype.slice;
  var slice = Function.prototype.call.bind(unboundSlice);

  slice(arguments);
}
ready

Revisions

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

  • Revision 1: published by urbeller on