HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
x
 
let o, m, w, owm;
const map = new Map();
const obj = Object.create(null);
const wm  = new WeakMap();
const wm2  = new WeakMap();
const objSet = (ob, k, v)=>{
  ob[k] = v;
  return ob;
};
let data = Object.create(null);
wm.set(data, new Map());
wm2.set(data, Object.create(null));
for (let i = 65; i < 90; i++) {
  let t = String.fromCharCode(i);
  obj[t] = i;
  map.set(t, i);
  wm.set(data, (wm.get(data)).set(t, i));
  wm2.set(data, objSet(wm2.get(data), t, i));
}
Tests:
  • Object

     
    o = obj['M'];
  • Map

     
    m = map.get('M');
  • Map in WeakMap

     
    w = wm.get(data).get('M');
  • Object in WeakMap

     
    owm = wm2.get(data)['M'];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object
    Map
    Map in WeakMap
    Object in WeakMap

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Windows
View result in a separate tab
Test name Executions per second
Object 8553419.0 Ops/sec
Map 8156600.0 Ops/sec
Map in WeakMap 7180517.0 Ops/sec
Object in WeakMap 7575181.0 Ops/sec