{"ScriptPreparationCode":"var arr10k = Array.from(Array(10000)).map((x, i) =\u003E ({ x1: i, x2: i * 2, x4: i * 4 }));\r\n\r\nfunction* getItems() {\r\n for (const x of arr10k) {\r\n yield [x.x1, x];\r\n }\r\n}","TestCases":[{"Name":"Map from .reduce","Code":"arr10k.reduce((acc, x) =\u003E acc.set(x.x1, x), new Map());","IsDeferred":false},{"Name":"Map from .map","Code":"new Map(arr10k.map(x =\u003E [x.x1, x]));","IsDeferred":false},{"Name":"Map from generator function","Code":"new Map(getItems());","IsDeferred":false}]}