Script Preparation code:
AخA
 
var to0 = {};
var to1 = {};
var wm = new Map();
var sy = Symbol();
wm.set(to1, 1);
to1[sy] = 1;
Tests:
  • WeakMap set

     
    wm.set(to0, 1);
  • Symbol Property set

     
    to0[sy] = 1;
  • WeakMap get

     
    let r = wm.get(to1);
  • Symbol Property get

     
    let r = to1[sy];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    WeakMap set
    Symbol Property set
    WeakMap get
    Symbol Property get

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104 on Windows
View result in a separate tab
Test name Executions per second
WeakMap set 6627580.0 Ops/sec
Symbol Property set 6686966.5 Ops/sec
WeakMap get 6554743.0 Ops/sec
Symbol Property get 7040482.5 Ops/sec