{"ScriptPreparationCode":" var totalValues = 1024 * 1024;\r\n\tvar valueSize = 4;\r\n\tvar totalBytes = totalValues * valueSize;\r\n\tvar buffer = new ArrayBuffer(totalBytes);\r\n\t// fill\r\n\tvar dv = new DataView(buffer);\r\n\tfor (i=0; i\u003CtotalBytes; i\u002B=valueSize) {\r\n\t num = Math.floor(Math.random()*Math.pow(2,8*valueSize));\r\n\t dv.setUint32(i,num,true);\r\n\t}\r\n\t\r\n\tfunction readUnsignedInt(stream){\r\n\t\tvar l=stream[seek]\u002Bstream[seek\u002B1]*256\u002Bstream[seek\u002B2]*65536\u002Bstream[seek\u002B3]*16777216;\r\n\t\tseek=seek\u002B4;\r\n\t\treturn l;\r\n\t}\r\n\t\r\n\tvar seek=0;\r\n\tvar stream = new Uint8Array(buffer);\r\n","TestCases":[{"Name":"Dataview","Code":"\tfor (i=0; i\u003CtotalBytes; i\u002B=valueSize) {\r\n\t num = dv.getUint32(i,true);\t \r\n }\t","IsDeferred":false},{"Name":"Custom","Code":"\tfor (i=0; i\u003CtotalBytes; i\u002B=valueSize) {\r\n\t num = readUnsignedInt(stream);\t \r\n }\t\r\n","IsDeferred":false},{"Name":"Basecase - Just loop","Code":"\tfor (i=0; i\u003CtotalBytes; i\u002B=valueSize) {\r\n }\t","IsDeferred":false}]}