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: one year ago)
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109 on Windows 7
View result in a separate tab
Test name Executions per second
Map 650376.3 Ops/sec
Array 440651.6 Ops/sec
Object 393343.7 Ops/sec