{"ScriptPreparationCode":"function generateTestArray() {\r\n const result = [];\r\n for (let i = 0; i \u003C 1000000; \u002B\u002Bi) {\r\n result.push({\r\n a: i,\r\n b: i / 2,\r\n r: 0,\r\n });\r\n }\r\n return result;\r\n}\r\nvar array = generateTestArray();","TestCases":[{"Name":".forEach","Code":"array.forEach((x) =\u003E {\r\n x.r = x.a \u002B x.b;\r\n});","IsDeferred":false},{"Name":"for..of","Code":"for(const x of array) {\r\n\tx.r = x.a \u002B x.b;\r\n}","IsDeferred":false},{"Name":"for..of (destructuring)","Code":"const r = [];\r\nfor(const {a, b} of array) {\r\n\tr.push(a \u002B b);\r\n}","IsDeferred":false},{"Name":".map","Code":"array.map(x =\u003E x.a \u002B x.b)","IsDeferred":false},{"Name":".map (destructuring)","Code":"array.map(({a,b}) =\u003E a \u002B b)","IsDeferred":false},{"Name":".for (init array)","Code":"const r = new Array(array.length);\r\nfor (let i = 0; i \u003C array.length; \u002B\u002Bi) {\r\n r[i] = array[i].a \u002B array[i].b;\r\n}","IsDeferred":false},{"Name":".reduce","Code":"array.reduce((p, x) =\u003E p \u002B x.a \u002B x.b, 0);","IsDeferred":false},{"Name":".reduce (destructuring)","Code":"array.reduce((p, {a,b}) =\u003E p \u002B a \u002B b, 0);","IsDeferred":false},{"Name":"for..of (reduce)","Code":"let r = 0;\r\nfor (const x of array) {\r\n r \u002B= x.a \u002B x.b;\r\n}","IsDeferred":false},{"Name":"for..of (reduce) (destructuring)","Code":"let r = 0;\r\nfor (const {a,b} of array) {\r\n r \u002B= a \u002B b;\r\n}","IsDeferred":false},{"Name":"forEach index","Code":"array.forEach((_, i) =\u003E {\r\n array[i].r = array[i].a \u002B array[i].b;\r\n});","IsDeferred":false}]}