<!--your preparation HTML code goes here-->
let o, m, w;
const map = new Map();
const obj = Object.create(null);
const wm = new WeakMap();
let data = Object.create(null);
wm.set(data, new Map());
for (let i = 65; i < 90; i++) {
let t = String.fromCharCode(i);
obj[t] = i;
map.set(t, i);
wm.set(data, (wm.get(data)).set(t, i));
}
o = obj['M'];
m = map.get('M');
w = wm.get(data).get('M');
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
Object | |
Map | |
Map in WeakMap |
This benchmark does not have any results yet. Be the first one to run it!