Script Preparation code:
Tests:
  • Object.fromEntries

  • Reduce (reuse object)

  • Reduce (array to Map)

  • Reduce (array to Set)

  • Init (Object to Map)

  • Init Set (from array using `Object.values`)

  • Init Set (from array)

  • From Object to Map to Object

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Object.fromEntries
    Reduce (reuse object)
    Reduce (array to Map)
    Reduce (array to Set)
    Init (Object to Map)
    Init Set (from array using `Object.values`)
    Init Set (from array)
    From Object to Map to Object

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124 on Windows
View result in a separate tab
Test name Executions per second
Object.fromEntries 3602075.0 Ops/sec
Reduce (reuse object) 14358.4 Ops/sec
Reduce (array to Map) 6059.8 Ops/sec
Reduce (array to Set) 6848.5 Ops/sec
Init (Object to Map) 3416972.8 Ops/sec
Init Set (from array using `Object.values`) 1417.8 Ops/sec
Init Set (from array) 9918.0 Ops/sec
From Object to Map to Object 2130119.8 Ops/sec


;