Script Preparation code:
x
 
const _onSuccess = () => {
    return {
        a: "something",
        b: "something else"
    }
}
const upload = (successCb) => {
    return successCb()
}
const onClick = () => {
    return upload(_onSuccess)
}
const onClickCb = () => {
    const onSuccess = () => {
        return {
            a: "something",
            b: "something else"
        }
    }
    return upload(onSuccess)
}
window.onClick = onClick
window.onClickCb = onClickCb
Tests:
  • instance method

     
    onClick()
  • callback

     
    onClickCb()
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    instance method
    callback

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0
Firefox 77 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
instance method 96347256.0 Ops/sec
callback 111812848.0 Ops/sec