{"ScriptPreparationCode":"\r\nconst range = (start, stop, step) =\u003E Array.from({\r\n length: (stop - start) / step \u002B 1\r\n}, (_, i) =\u003E start \u002B (i * step));\r\n\r\nfunction buildArray() {\r\n return range(0, 1000000, 1);\r\n}\r\nvar myArray = buildArray();\r\n","TestCases":[{"Name":"Array spread function array","Code":"function getValues(i){\r\n const offset = i * 3;\r\n return [myArray[offset],myArray[offset\u002B1],myArray[offset\u002B2]];\r\n}\r\nfunction getTest(i){\r\nconst offset = i*3;\r\nreturn [...getValues(offset), ...getValues(offset\u002B1), ...getValues(offset\u002B2)];\r\n}\r\n\r\nconst result = getTest(100);\r\n","IsDeferred":false},{"Name":"Array via object","Code":"function getValues(i){\r\n const offset = i * 3;\r\n return {a: myArray[offset],b: myArray[offset\u002B1],c: myArray[offset\u002B2]};\r\n}\r\n\r\nfunction getTest(i){\r\nconst offset = i*3;\r\nlet a = getValues(offset);\r\nlet b = getValues(offset\u002B1);\r\nlet c = getValues(offset\u002B2);\r\nreturn [a.a, a.b, a.c, b.a, b.b, b.c,c.a, c.b, c.c];\r\n}\r\n\r\nconst result = getTest(100);\r\n","IsDeferred":false},{"Name":"Array direct","Code":"function getTest(i){\r\nconst offset = i*9;\r\nreturn [myArray[offset], myArray[offset\u002B1],myArray[offset\u002B2],myArray[offset\u002B3],myArray[offset\u002B4],myArray[offset\u002B5],myArray[offset\u002B6],myArray[offset\u002B7],myArray[offset\u002B8]];\r\n}\r\n\r\nconst result = getTest(100);","IsDeferred":false},{"Name":"Array slice","Code":"function getTest(i){\r\nconst offset = i*9;\r\nreturn myArray.slice(offset, offset\u002B9);\r\n}\r\n\r\nconst result = getTest(100);","IsDeferred":false},{"Name":"Array slice proto (for ArrayLike objects)","Code":"function getTest(i){\r\nconst offset = i*9;\r\nreturn Array.prototype.slice.call(myArray,offset, offset\u002B9);\r\n}\r\n\r\nconst result = getTest(100);","IsDeferred":false}]}