{"ScriptPreparationCode":"var set = new Set();\r\nvar obj = {};\r\nvar array = [];\r\nvar size = 1000000;\r\n\r\nvar test = (function (length, probability) {\r\n function random() {\r\n return Math.random().toString(36).substr(2);\r\n }\r\n var i;\r\n for (i = 0; i \u003C size; i\u002B\u002B) {\r\n var str = random();\r\n set.add(str);\r\n obj[str] = true;\r\n array[i] = str;\r\n }\r\n \r\n var test = [];\r\n test.length = length;\r\n var c = size / probability;\r\n for (i = 0; i \u003C length; i\u002B\u002B) {\r\n var index = Math.floor(Math.random() * c);\r\n test[i] = index \u003C size ? array[index] : random();\r\n }\r\n return test;\r\n})(10000, 0.5);\r\n","TestCases":[{"Name":"Includes","Code":"var count = 0;\r\nfor (var i = 0; i \u003C test.length; i\u002B\u002B) {\r\n if (array.includes(test[i])) {\r\n count\u002B\u002B;\r\n }\r\n}\r\n","IsDeferred":false},{"Name":"Object","Code":"var count = 0;\r\nfor (var i = 0; i \u003C test.length; i\u002B\u002B) {\r\n if (!!test[i]) {\r\n count\u002B\u002B;\r\n }\r\n}\r\n","IsDeferred":false},{"Name":"Set","Code":"var count = 0;\r\nfor (var i = 0; i \u003C test.length; i\u002B\u002B) {\r\n if (set.has(test[i])) {\r\n count\u002B\u002B;\r\n }\r\n}\r\n","IsDeferred":false}]}