{"ScriptPreparationCode":null,"TestCases":[{"Name":"new Array fill","Code":"console.log(\u0022new Array fill\u0022);\r\n((times, start, time, num) =\u003E {\r\n for(let i = 0; i \u003C num; i\u002B\u002B) {\r\n start = performance.now();\r\n const arr = (new Array(10_000_000)).fill(1);\r\n time = performance.now() - start;\r\n console.log(time);\r\n times[i] = time;\r\n }\r\n const ave = times.reduce((pre, cur) =\u003E pre \u002B cur) / num;\r\n console.log(\u0022ave\u0022, ave);\r\n})([], 0, 0, 10);\r\n","IsDeferred":false},{"Name":"for init","Code":"console.log(\u0022for init\u0022);\r\n((times, start, time, num) =\u003E {\r\n for(let i = 0; i \u003C num; i\u002B\u002B) {\r\n const arr = [];\r\n start = performance.now();\r\n for(let i = 0; i \u003C 10_000_000; i\u002B\u002B) {\r\n arr[i] = 1|0;\r\n }\r\n time = performance.now() - start;\r\n console.log(time);\r\n times[i] = time;\r\n }\r\n const ave = times.reduce((pre, cur) =\u003E pre \u002B cur) / num;\r\n console.log(\u0022ave\u0022, ave);\r\n})([], 0, 0, 10);\r\n","IsDeferred":false}]}