{"ScriptPreparationCode":"var set = new Set();\r\nvar obj = Object.create(null);\r\n\r\nvar test = (function (length, size, probability) {\r\n function random() {\r\n return Math.random().toString(36).substr(2);\r\n }\r\n var i;\r\n \r\n var array = [];\r\n array.length = size;\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, 1000000, 0.5);\r\n","TestCases":[{"Name":"Set.prototype.has()","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},{"Name":"\u0022in\u0022 operator","Code":"var count = 0;\r\nfor (var i = 0; i \u003C test.length; i\u002B\u002B) {\r\n if (test[i] in obj) {\r\n count\u002B\u002B;\r\n }\r\n}\r\n","IsDeferred":false}]}