{"ScriptPreparationCode":"var keyCount = 16384\r\nvar keys = []\r\nvar map = new Map()\r\nvar obj = {}\r\n\r\n\r\n// Hide lookup keys to prevent V8 cheating (AKA Optimizing)\r\nvar getConspicuousKey = seed =\u003E keys[Math.floor(seed * keyCount)]\r\n\r\n\r\n// Setup out test objects w/ random values\r\nfor (let i=0; i\u003CkeyCount; i\u002B\u002B) {\r\n let val = Math.random()\r\n let key = Math.random()\r\n keys.push(key)\r\n map.set(key,val)\r\n obj[key] = val\r\n}\r\n\r\nvar mapEntries = map.entries();\r\nvar objJson = JSON.stringify(obj);","TestCases":[{"Name":"Conspicuous Map lookup","Code":"for (let i=0; i\u003CkeyCount; i\u002B\u002B) {\r\n let seed = Math.random()\r\n let key = getConspicuousKey(seed)\r\n a = map.get(key)\r\n}","IsDeferred":false},{"Name":"Conspicuous Obj lookup","Code":"for (let i=0; i\u003CkeyCount; i\u002B\u002B) {\r\n let seed = Math.random()\r\n let key = getConspicuousKey(seed)\r\n a = obj[key]\r\n}","IsDeferred":false},{"Name":"Conspicuous Map lookup 2","Code":"for (let i=0; i\u003CkeyCount; i\u002B\u002B) {\r\n let seed = Math.random()\r\n let key = getConspicuousKey(seed)\r\n a = map.get(key)\r\n}","IsDeferred":false},{"Name":"Conspicuous Obj lookup 2","Code":"for (let i=0; i\u003CkeyCount; i\u002B\u002B) {\r\n let seed = Math.random()\r\n let key = getConspicuousKey(seed)\r\n a = obj[key]\r\n}","IsDeferred":false},{"Name":"Map.entries","Code":"map.entries();","IsDeferred":false},{"Name":"JSON.stringify","Code":"JSON.stringify(obj);","IsDeferred":false},{"Name":"parse Map entries","Code":"var test = new Map(mapEntries);","IsDeferred":false},{"Name":"parse JSON","Code":"var test = JSON.parse(objJson);","IsDeferred":false},{"Name":"encode \u0026 decode Map","Code":"var mapEncoded = map.entries();\r\nvar decoded = new Map(mapEncoded);","IsDeferred":false},{"Name":"encode \u0026 decode JSON","Code":"var encoded = JSON.stringify(obj);\r\nvar decoded = JSON.parse(encoded);","IsDeferred":false}]}