Test case name | Result |
---|---|
forEach #1 | |
fromEntries and map #1 | |
Object.assign and map #1 | |
reduce #1 | |
for | |
forEach #2 | |
fromEntries and map #2 | |
Object.assign and map #2 | |
reduce #2 |
Test name | Executions per second |
---|---|
forEach #1 | 10276245.0 Ops/sec |
fromEntries and map #1 | 7442708.5 Ops/sec |
Object.assign and map #1 | 3632343.0 Ops/sec |
reduce #1 | 3104651.5 Ops/sec |
for | 16240029.0 Ops/sec |
forEach #2 | 10327516.0 Ops/sec |
fromEntries and map #2 | 7483971.5 Ops/sec |
Object.assign and map #2 | 3609575.5 Ops/sec |
reduce #2 | 2944705.0 Ops/sec |