Run details:
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
Windows
Desktop
7 months ago
Test name Executions per second
Object.fromEntries 3641260.2 Ops/sec
Reduce (reuse object) 14815.0 Ops/sec
Reduce (Object to Map) 6630.0 Ops/sec
Reduce (Object to Set) 7171.2 Ops/sec
Init (Object to Map) 3222249.2 Ops/sec
Init Set (from array using `Object.values`) 8638.8 Ops/sec
Init Set (from array) 9916.1 Ops/sec
From Object to Map to Object 2353004.8 Ops/sec
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


;