Function.bind performance (v14)

Revision 14 of this benchmark created on


Setup

var generatedFunction = new Function("arg1", "arg2", "arg3", "arg4", "arg5", "return arg1 + arg2 + arg3 + arg4 + arg5");
  
  var bind = generatedFunction.bind(null, 1)
  var manual = function(arg2, arg3, arg4, arg5) {
    return generatedFunction(1, arg2, arg3, arg4, arg5)
  }

Test runner

Ready to run.

Testing in
TestOps/sec
Bind
bind(2, 3, 4, 5)
ready
Closure
manual(2, 3, 4, 5)
ready

Revisions

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