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 |
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 |