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

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

     
    to0[sy] = 1;
  • WeakMap get

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

     
    r = to1[sy];
  • Symbol Property get (from own descriptor)

     
    r = Object.getOwnPropertyDescriptor(to1, sy).value;
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
    Symbol Property get (from own descriptor)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0
Chrome 129 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
WeakMap set 14262492.0 Ops/sec
Symbol Property set 14462870.0 Ops/sec
WeakMap get 7349803.5 Ops/sec
Symbol Property get 7678899.0 Ops/sec
Symbol Property get (from own descriptor) 5070251.5 Ops/sec