{"ScriptPreparationCode":null,"TestCases":[{"Name":"without indexing","Code":"function fill(count) {\r\n let obj = {}\r\n\r\n for(i=0; i\u003C100000; i\u002B\u002B){\r\n let v = { g: i, v: i };\r\n obj = { ...obj, i: v};\r\n }\r\n return Object.entries(obj);\r\n}\r\n\r\nconsole.log(fill(10000).length)\r\n","IsDeferred":false},{"Name":"with indexing","Code":"function fill(count) {\r\n let obj = {}\r\n\r\n for(i=0; i\u003C100000; i\u002B\u002B){\r\n let v = { g: i, v: i };\r\n obj[i] = v;\r\n }\r\n return Object.entries(obj);\r\n}\r\n\r\nconsole.log(fill(10000).length)","IsDeferred":false},{"Name":"with set and array","Code":"function fill(count) {\r\n \tlet objArray = [] \r\n\tlet set1 = new Set();\r\n\r\n for(i=0; i\u003Ccount; i\u002B\u002B){ \r\n if(!set1.has(i))\r\n {\r\n set1.add(i);\r\n let v = { g: i, v: i };\r\n objArray.push(v);\r\n } \r\n }\r\n return objArray;\r\n}\r\n\r\nconsole.log(fill(10000).length)","IsDeferred":false}]}