Script Preparation code:
x
 
var target = {};
var obj = {};
for (var i = 0; i < 100; i++) {
    obj['propp'+i] = ('this is a value ' + i);
}
Tests:
  • Object.assign

     
    Object.assign(target, obj);
  • For in

     
    for (var key in obj) {
      target[key] = obj[key];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object.assign
    For in

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129 on Windows
View result in a separate tab
Test name Executions per second
Object.assign 532681.4 Ops/sec
For in 861590.8 Ops/sec