Script Preparation code:
x
 
var map = new Map();
var arr = [];
var obj = {};
var randomU32 = function() {
    return Math.random() * (1 << 31) >>> 0;
}
Tests:
  • Map

     
    map.set(randomU32(), true);
  • Array

     
    arr[randomU32()] = true;
  • Object

     
    obj[randomU32()] = true;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Map
    Array
    Object

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 6.1; rv:102.0) Gecko/20100101 Firefox/102.0
Firefox 102 on Windows 7
View result in a separate tab
Test name Executions per second
Map 53251.6 Ops/sec
Array 456040.7 Ops/sec
Object 416418.8 Ops/sec