Script Preparation code:
x
 
function hook1(hookMsg) {
  function test(msg) {
    var d = hookMsg + msg;
  }
  return {
    test,
  }
}
function testRoot(hookMsg, msg) {
  var d = hookMsg + msg;
}
function hook2(hookMsg) {
  return {
    test: testRoot.bind(null, hookMsg)
  }
}
Tests:
  • hook1

     
    hook1("Hook1").test("hello")
  • hook2

     
    hook2("Hook2").test("hello")
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    hook1
    hook2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
hook1 27181324.0 Ops/sec
hook2 13055037.0 Ops/sec