Script Preparation code:
AخA
 
var count = 100000
function runCount(f) {
    for(i=0; i<count; i++){f()}
}
Tests:
  • create empty object

     
    runCount(() => ( {} ));
  • create empty function

     
    runCount(() => ( () => {} ));
  • create function returns object

     
    runCount(() => ( () => ({}) ));
  • create object with 2 functions

     
    runCount(() => ( { open: () => {}, close: () => {} } ));
  • create function returns object with 2 funcitons

     
    runCount(() => ( () => ({ open: () => {}, close: () => {} }) ));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    create empty object
    create empty function
    create function returns object
    create object with 2 functions
    create function returns object with 2 funcitons

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Firefox 116 on Linux
View result in a separate tab
Test name Executions per second
create empty object 375.2 Ops/sec
create empty function 376.3 Ops/sec
create function returns object 386.8 Ops/sec
create object with 2 functions 303.2 Ops/sec
create function returns object with 2 funcitons 385.5 Ops/sec