{"ScriptPreparationCode":"var a = [];\r\nfor (var i = 0; i \u003C 1e6; i\u002B\u002B) {\r\n a[i] = Math.random();\r\n}","TestCases":[{"Name":"Map","Code":"var b = a.map(n =\u003E n * 2);","IsDeferred":false},{"Name":"For Loop","Code":"var b = [];\r\nfor (var i = 0; i \u003C a.length; i\u002B\u002B) {\r\n b[i] = a[i] * 2;\r\n}","IsDeferred":false},{"Name":"foreach","Code":"var b = a.forEach(n =\u003E n * 2);","IsDeferred":false},{"Name":"pre-allocated for loop","Code":"var b = new Array(a.length);\r\nfor (var i = 0; i \u003C a.length; i\u002B\u002B) {\r\n b[i] = a[i] * 2;\r\n}","IsDeferred":false},{"Name":"pre-allocated unrolled for loop","Code":"var b = new Array(a.length);\r\nfor (var i = 0; i \u003C a.length/4; i\u002B\u002B) {\r\n b[i*4] = a[i*4] * 2;\r\n b[i*4\u002B1] = a[i*4\u002B1] * 2;\r\n b[i*4\u002B2] = a[i*4\u002B2] * 2;\r\n b[i*4\u002B3] = a[i*4\u002B3] * 2;\r\n}","IsDeferred":false},{"Name":"\u002B\u002Bfor loop","Code":"var b = new Array(a.length);\r\nfor (var i = 0; i \u003C a.length; \u002B\u002Bi) {\r\n b[i] = a[i] * 2;\r\n}","IsDeferred":false},{"Name":"--for loop","Code":"var b = new Array(a.length);\r\nfor (var i = a.length; i \u003E= 0; --i) {\r\n b[i] = a[i] * 2;\r\n}","IsDeferred":false}]}