HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
x
 
const d1 = {};
for (let i = 0; i < 10000; i++) {
    d1[i] = i;
}
const d2 = new Map();
for (let i = 0; i < 10000; i++) {
    d2.set(i, i);
}
Tests:
  • Creation: Object

     
    let v = 0;
    for (let i1 = 0; i1 < 10000; i1++) {
        if (d1[i1] !== undefined) {
          v++;
        }
    }
  • Creation: Map

     
    let v = 0;
    for (let i2 = 0; i2 < 10000; i2++) {
        if (d2.has(i2)) {
          v++;
        }
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Creation: Object
    Creation: Map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 29 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136 on Windows
View result in a separate tab
Test name Executions per second
Creation: Object 91975.4 Ops/sec
Creation: Map 10409.6 Ops/sec