{"ScriptPreparationCode":"var testIds = [], storeArray = [], storeObject = {}, size = 300000, selectSize = size/100, i, defData = \u002712345678\u0027;\r\n\r\nfunction getRandomInt(min, max) {\r\n return Math.floor(Math.random() * (max - min)) \u002B min;\r\n}\r\n\r\nfor (i=0; i\u003Csize; i\u002B\u002B) {\r\n var id = \u0027id\u0027 \u002B i;\r\n storeArray.push({\r\n id: id,\r\n n: i,\r\n data: defData\r\n });\r\n}\r\n\r\nfor (i=0; i\u003Csize; i\u002B\u002B) {\r\n var id = \u0027id\u0027 \u002B i;\r\n storeObject[id] = {\r\n id: id,\r\n n: i,\r\n data: defData\r\n };\r\n}\r\n\r\nfor (i=0;i\u003CselectSize;i\u002B\u002B) {\r\n var id = \u0027id\u0027 \u002B getRandomInt(1, size);\r\n testIds.push(id);\r\n}\r\n\r\nconsole.log(testIds);","TestCases":[{"Name":"Array (Array.find)","Code":"var x = 0;\r\nfor (i=0;i\u003CselectSize;i\u002B\u002B) {\r\n var id = testIds[i];\r\n var it = storeArray.find(function(el, idx, arr) {\r\n if (el.id == id) return true;\r\n return false;\r\n });\r\n x \u002B= it.n;\r\n}\r\n","IsDeferred":false},{"Name":"Object","Code":"var x = 0;\r\nfor (i=0;i\u003CselectSize;i\u002B\u002B) {\r\n var id = testIds[i];\r\n var it = storeObject[id];\r\n x \u002B= it.n;\r\n}\r\n","IsDeferred":false}]}