{"ScriptPreparationCode":"var N = 1000000;\r\n\r\nvar x = new Array(N), y = new Array(N), vx = new Array(N), vy = new Array(N);\r\n\r\nvar buffer = new ArrayBuffer(N*8*4);\r\n\r\nvar tx = new Float64Array(buffer, 0, N),\r\n ty = new Float64Array(buffer, N*8, N),\r\n tvx = new Float64Array(buffer, N*16, N),\r\n tvy = new Float64Array(buffer, N*24, N);\r\n\r\nvar vectors = new Array(N);\r\n\r\nfor(var i = 0; i \u003C N; \u002B\u002Bi){\r\n x[i] = tx[i] = Math.random()*100|0;\r\n y[i] = ty[i] = Math.random()*100|0;\r\n vx[i] = tvx[i] = Math.random()*100|0;\r\n vy[i] = tvy[i] = Math.random()*100|0;\r\n \r\n vectors[i] = { x: x[i], y: y[i], vx: vx[i], vy: vy[i] };\r\n}\r\n\r\nvar vector;","TestCases":[{"Name":"soa","Code":"for (var i = 0; i \u003C N; \u002B\u002Bi) {\r\n x[i] \u002B= vx[i];\r\n y[i] \u002B= vy[i];\r\n}","IsDeferred":false},{"Name":"aos","Code":"for (var i = 0; i \u003C N; \u002B\u002Bi) {\r\n vector = vectors[i];\r\n vector.x \u002B= vector.vx;\r\n vector.y \u002B= vector.vy;\r\n}","IsDeferred":false},{"Name":"typed soa","Code":"for (var i = 0; i \u003C N; \u002B\u002Bi) {\r\n tx[i] \u002B= tvx[i];\r\n ty[i] \u002B= tvy[i];\r\n}","IsDeferred":false}]}