Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
luke test
(version: 0)
Comparing performance of:
WeakMap get vs Symbol get vs String get
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
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>
Run tests (3)
Previous results
Fork
Test case name
Result
WeakMap get
Symbol get
String get
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
JavaScript spread operator vs Object.assign performance 22
JavaScript spread operator vs Object.assign performance 224
JavaScript spread operator vs Object.assign performance 22476
Lodash.js intersection vs native
Lodash.js vs Native Map 11111111232312
Comments
Confirm delete:
Do you really want to delete benchmark?