Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115
Linux
Desktop
2 years ago
Using For-In loop
17.5M/s
Using Object.assign
6.1M/s
Using the spread operator
5.2M/s
Using For-In loop with hasOwnProperty
5.1M/s
View exact numbers
Test name Executions per second
Using For-In loop 17,529,436 Ops/sec
Using Object.assign 6,118,790 Ops/sec
Using the spread operator 5,197,400 Ops/sec
Using For-In loop with hasOwnProperty 5,130,184 Ops/sec
Tests: