Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Map vs Symbol Property
(version: 0)
Comparing performance of:
WeakMap set vs Symbol Property set vs WeakMap get vs Symbol Property get
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
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>
Run tests (4)
Previous results
Fork
Test case name
Result
WeakMap set
Symbol Property set
WeakMap get
Symbol Property 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:
Object spread operator vs property assignment
Spread operator vs Object.assign
JavaScript spread operator vs Object.assign performance 22
JavaScript spread operator vs Object.assign performance 224
JavaScript spread operator vs Object.assign performance 22476
Comments
Confirm delete:
Do you really want to delete benchmark?