{"ScriptPreparationCode":"var arr = [];\r\nfor (let i = 0; i \u003C 10000; i\u002B\u002B) {\r\n arr.push({id: i, name: \u0060object${i}\u0060});\r\n}","TestCases":[{"Name":"Find","Code":"for (let i = 0; i \u003C 10000; i\u002B=2) {\r\n const val = arr.find(x =\u003E x.id === i);\r\n if (val.name !== \u0060object${i}\u0060) {\r\n throw new Error(\u0027wrong found\u0027);\r\n }\r\n}","IsDeferred":false},{"Name":"For loop","Code":"for (let i = 0; i \u003C 10000; i\u002B=2) {\r\n for (let j = 0, len = arr.length; j \u003C len; j\u002B\u002B) {\r\n if (arr[j].id === i) {\r\n const val = arr[j];\r\n if (val.name !== \u0060object${i}\u0060) {\r\n throw new Error(\u0027wrong found\u0027);\r\n }\r\n break;\r\n }\r\n }\r\n}","IsDeferred":false},{"Name":"Object","Code":"const obj = arr.reduce((acc, x) =\u003E {acc[x.id] = x; return acc;}, {});\r\nfor (let i = 0; i \u003C 10000; i\u002B=2) {\r\n const val = obj[i];\r\n if (val.name !== \u0060object${i}\u0060) {\r\n throw new Error(\u0027wrong found\u0027);\r\n }\r\n}","IsDeferred":false},{"Name":"Map","Code":"const mapping = new Map(arr.map(x =\u003E [x.id, x]));\r\nfor (let i = 0; i \u003C 10000; i\u002B=2) {\r\n const val = mapping.get(i);\r\n if (val.name !== \u0060object${i}\u0060) {\r\n throw new Error(\u0027wrong found\u0027);\r\n }\r\n}","IsDeferred":false}]}