Curried function vs binded

Benchmark created on


Setup

var sourceFunction = function(a, b) { return (a + b) * this.m; }
    var context = { m: 3 };
    var a = 10;
    var b = 5;
    
    var binded = sourceFunction.bind(context);
    var curried = sourceFunction.bind(context, a);

Test runner

Ready to run.

Testing in
TestOps/sec
Binded
binded(a, b);
ready
Curried
curried(b);
ready
Call
sourceFunction.call(context, a, b);
ready

Revisions

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