Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
Firefox 112
Windows
Desktop
one year ago
Test name Executions per second
direct call 827941824.0 Ops/sec
saved bind 85249080.0 Ops/sec
inline bind 42363032.0 Ops/sec
call 786095680.0 Ops/sec
apply 80231592.0 Ops/sec
closure 785275584.0 Ops/sec
Script Preparation code:
AخA
 
function test(msg) {
    var d = msg;
}
var boundTest = test.bind("Hello");
var closure = () => test("Hello");
Tests:
  • direct call

     
    test("Hello");
  • saved bind

     
    boundTest();
  • inline bind

     
    test.bind(null, "Hello")();
  • call

     
    test.call(null, "Hello");
  • apply

     
    test.apply(null, ["Hello"]);
  • closure

     
    closure()