{"ScriptPreparationCode":"var memory = new ArrayBuffer(1024 * 1024);\r\nvar memoryF32 = new Float32Array(memory);\r\nvar memoryU32 = new Uint32Array(memory);","TestCases":[{"Name":"Array access","Code":"for (let i = 0; i \u003C 1024; \u002B\u002Bi) {\r\n memoryF32[i] = Math.random();\r\n}\r\n\r\nfor (let i = 1; i \u003C 1024; \u002B\u002Bi) {\r\n memoryF32[i-1] = memoryF32[i] * 2;\r\n}\r\n\r\nfor (let i = 1; i \u003C 1024; \u002B\u002Bi) {\r\n memoryU32[i \u002B 1024] = memoryF32[i] \u003E 0.5 ? 1 : 0;\r\n}","IsDeferred":false},{"Name":"Function access","Code":"const readF32 = (idx) =\u003E memoryF32[idx];\r\nconst writeF32 = (idx, value) =\u003E memoryF32[idx] = value;\r\nconst writeU32 = (idx, value) =\u003E memoryU32[idx\u002B1024] = value;\r\n\r\nfor (let i = 0; i \u003C 1024; \u002B\u002Bi) {\r\n writeF32(i, Math.random());\r\n}\r\n\r\nfor (let i = 1; i \u003C 1024; \u002B\u002Bi) {\r\n writeF32(i-1, readF32(i) * 2);\r\n}\r\n\r\nfor (let i = 1; i \u003C 1024; \u002B\u002Bi) {\r\n writeU32(i, memoryF32[i] \u003E 0.5 ? 1 : 0);\r\n}\r\n\r\n","IsDeferred":false}]}