{"ScriptPreparationCode":"function func(a, b) { \r\n return 0.5 - Math.random();\r\n} \r\n\r\nvar a = Array.from({length: 1000}).map((_, i) =\u003E i)\r\nvar arrA0 = a.toSorted(func);\r\nvar arrA1 = a.toSorted(func);\r\nvar arrA2 = a.toSorted(func);\r\n\r\nvar arrS0 = new Set(a.map((_, i) =\u003E i).toSorted(func));\r\nvar arrS1 = new Set(a.map((_, i) =\u003E i).toSorted(func));\r\n\r\n\r\nconst tenItemsToFind = () =\u003E a.toSorted(func).slice(0, 10);\r\nvar list = a.slice(0,10).map(() =\u003E Array.from({length: 1000}).map((_, i) =\u003E i).toSorted(func).slice(0, 100))\r\n\r\nvar listLast = a.map(v =\u003E v).toSorted(func);\r\nvar listLastTwo =a.map(v =\u003E v).toSorted(func);\r\n\r\nvar aclone = a.map(v=\u003Ev);\r\nvar aclonetwo = a.map(v=\u003Ev);\r\n","TestCases":[{"Name":"ARRincludes","Code":"list.forEach( arr =\u003E arr.forEach( a =\u003E arrA0.includes(a)))","IsDeferred":false},{"Name":"Arr find","Code":"list.forEach( arr =\u003E arr.forEach( a =\u003E arrA0.find(v =\u003E v === a)))","IsDeferred":false},{"Name":"SET has","Code":"list.forEach(arr =\u003E arr.forEach(a =\u003E arrS0.has(a)))","IsDeferred":false},{"Name":" Arr some","Code":"list.forEach( arr =\u003E arr.forEach( a =\u003E arrA0.some(v =\u003E v === a)))","IsDeferred":false},{"Name":"Arr indexOf","Code":"list.forEach( arr =\u003E arr.forEach( a =\u003E arrA1.indexOf(a)))","IsDeferred":false},{"Name":"Arr sort \u002B index","Code":"list.forEach( arr =\u003E arr.forEach( a =\u003E arrA2[a]))","IsDeferred":false},{"Name":"Arr presorted with remove - splice","Code":"listLast.forEach(v =\u003E {\r\n let b = aclone[v];\r\n aclone.splice(v, 1);\r\n})","IsDeferred":false},{"Name":"Arr presorted with remove - set","Code":"listLastTwo.forEach(v =\u003E {\r\n let b = aclonetwo[v];\r\n aclonetwo[v] = null;\r\n aclonetwo = aclonetwo.filter(Boolean)\r\n})","IsDeferred":false}]}