{"ScriptPreparationCode":"var N = 1000000;\r\n\r\nvar x = [], y = [], z = [];\r\n\r\nvar xt = new Float32Array(1000000);\r\nvar yt = new Float32Array(1000000);\r\nvar zt = new Float32Array(1000000);\r\n\r\nvar vectors = [];\r\n\r\nfor(var i = 0; i \u003C N; i\u002B\u002B){\r\n x[i] = Math.random();\r\n y[i] = Math.random();\r\n z[i] = Math.random();\r\n \r\n xt[i] = x[i];\r\n yt[i] = y[i];\r\n zt[i] = z[i];\r\n \r\n vectors[i] = { x: x[i], y: y[i], z: z[i] };\r\n}\r\n\r\nvar vector;","TestCases":[{"Name":"soa","Code":"for (var i = 0, li=x.length; i \u003C li; \u002B\u002Bi) {\r\n xt[i] = 2 * xt[i];\r\n yt[i] = 2 * yt[i];\r\n zt[i] = 2 * zt[i];\r\n}","IsDeferred":false},{"Name":"aos","Code":"for (var i = 0, li=vectors.length; i \u003C li; \u002B\u002Bi) {\r\n vector = vectors[i];\r\n vector.x = 2 * vector.x;\r\n vector.y = 2 * vector.y;\r\n vector.z = 2 * vector.z;\r\n}","IsDeferred":false},{"Name":"soa mark II","Code":"for (var i = 0, li=xt.length; i \u003C li; \u002B\u002Bi) {\r\n xt[i] = 2 * xt[i];\r\n}\r\nfor (var i = 0, li=yt.length; i \u003C li; \u002B\u002Bi) {\r\n yt[i] = 2 * yt[i];\r\n}\r\nfor (var i = 0, li=zt.length; i \u003C li; \u002B\u002Bi) {\r\n zt[i] = 2 * zt[i];\r\n}","IsDeferred":false}]}