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

     
    let r = wm.get(to0);
  • Symbol get

     
    let r = to1[sy];
  • String get

     
    let r = to2[str];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    WeakMap get
    Symbol get
    String get

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116 on Linux
View result in a separate tab
Test name Executions per second
WeakMap get 4643546.0 Ops/sec
Symbol get 4872382.5 Ops/sec
String get 4894427.5 Ops/sec