{"ScriptPreparationCode":"var arr = []\r\nfor (let i = 0; i \u003C 5000; i\u002B\u002B) {\r\n\tarr.push({key: Math.round(i/100), value: i})\r\n}","TestCases":[{"Name":"for-loop","Code":"const keys = {}\r\nlet i\r\nlet len = arr.length\r\nfor (let i = 0; i\u003Clen; i\u002B\u002B) {\r\n\tconst it = arr[i]\r\n\tconst g = keys[it.key]\r\n\tif (g) {\r\n\t\tg.items.push(it)\r\n\t} else {\r\n\t\tkeys[it.key] = {items: [], key: it.key}\r\n\t}\r\n}","IsDeferred":false},{"Name":"reduce","Code":"const keys2 = {}\r\narr.reduce((acc, it) =\u003E {\r\n\tconst g = acc[it.key]\r\n\tif (g) {\r\n\t\tg.items.push(it)\r\n\t} else {\r\n\t\tacc[it.key] = {items: [], key: it.key}\r\n\t}\r\n\treturn acc\r\n}, keys2)","IsDeferred":false}]}