{"ScriptPreparationCode":"function getArray(length) {\r\n const result = [];\r\n for (let i = 0; i \u003C length; i\u002B\u002B) {\r\n result.push(i \u002B \u0027abc\u0027); // In case the browser does some sort of optimization for arrays with only integers \u00AF\\_(\u30C4)_/\u00AF\r\n }\r\n return result;\r\n}\r\n\r\nfunction getRandomTargetElement(arrayLength) {\r\n const index = Math.floor(Math.random() * arrayLength);\r\n return index \u002B \u0027abc\u0027;\r\n}\r\n\r\n\r\narray_small = getArray(10000);\r\narray_large = getArray(1000000);\r\n\r\nset_small = new Set(array_small);\r\nset_large = new Set(array_large);\r\n","TestCases":[{"Name":"Array.includes, 10 000 elements","Code":"array_small.includes(getRandomTargetElement(10000));","IsDeferred":false},{"Name":"Array.includes, 1 000 000 elements","Code":"array_large.includes(getRandomTargetElement(1000000))","IsDeferred":false},{"Name":"Set.has, 10 000 elements","Code":"set_small.has(getRandomTargetElement(10000))","IsDeferred":false},{"Name":"Set.has, 1 000 000 elements","Code":"set_large.has(getRandomTargetElement(1000000))","IsDeferred":false},{"Name":"Array to Set \u002B Set.has, 10 000 elements","Code":"const target = getRandomTargetElement(10000);\r\nconst set = new Set(array_small);\r\nset.has(target)","IsDeferred":false},{"Name":"Array to Set \u002B Set.has x 100, 10 000 elements","Code":"const set = new Set(array_small);\r\nfor (let i = 0; i \u003C 100; i\u002B\u002B) {\r\n const target = getRandomTargetElement(10000);\r\n set.has(target)\r\n}","IsDeferred":false},{"Name":"Array.includes x 100, 10 000 elements","Code":"for (let i = 0; i \u003C 100; i\u002B\u002B) {\r\n const target = getRandomTargetElement(10000);\r\n array_small.includes(target)\r\n}","IsDeferred":false}]}