Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
one year ago
Object.keys() with for
61.1M/s
Object.keys with for...of
58.3M/s
Object.keys() with forEach
57.6M/s
Object.entries() with for...of
32.7M/s
for...in Loop
30.4M/s
View exact numbers
Test name Executions per second
Object.keys() with for 61,123,536 Ops/sec
Object.keys with for...of 58,251,860 Ops/sec
Object.keys() with forEach 57,581,752 Ops/sec
Object.entries() with for...of 32,705,400 Ops/sec
for...in Loop 30,422,912 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests: