Object.entries VS Object.keys VS Object.keys with extra array VS Object.entries without array vs. for...in
one year ago
User agent:
Mozilla/5.0 (Linux; Android 13; RMX3686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Mobile Safari/537.36
Test name |
Executions per second |
Object.entries |
27418.3 Ops/sec |
Object.keys |
37569.8 Ops/sec |
Object.keys with extra array |
23536.2 Ops/sec |
Object.entries without array |
33381.2 Ops/sec |
Object for..in |
237421.3 Ops/sec |
Tests:
-
Object.entries
-
Object.keys
-
Object.keys with extra array
-
Object.entries without array
-
Object for..in
Open this result on MeasureThat.net