Tests:
  • Map Clone

    x
     
    const map = new Map();
    const object = {};
    for (i = 0; i < 30; i++) {
        object[`${i}_key`, i];
        map.set(`${i}_key`, i);
    }
    const newMap = new Map(map.entries())
  • Object Clone

     
    const map = new Map();
    const object = {};
    for (i = 0; i < 30; i++) {
        object[`${i}_key`, i];
        map.set(`${i}_key`, i);
    }
    const newObject = {...object}
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Map Clone
    Object Clone

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36
Chrome 83 on Mac OS X 10.15.5
View result in a separate tab
Test name Executions per second
Map Clone 219615.7 Ops/sec
Object Clone 379336.2 Ops/sec