{"ScriptPreparationCode":"var fewItemArr = [1, 2, 3];\r\nvar fewItemSet = new Set(fewItemArr);\r\nvar manyItemArr = Array.from({ length: 1000 }, (_, i) =\u003E i);\r\nvar manyItemSet = new Set(manyItemArr);","TestCases":[{"Name":"native loop arr: few items","Code":"let result = 0;\r\nfor (let i = fewItemArr.length; i--;) {\r\n result \u002B= fewItemArr[i];\r\n}","IsDeferred":false},{"Name":"for of set: few items","Code":"let result = 0;\r\nfor (const item of fewItemSet) {\r\n result \u002B= item;\r\n}","IsDeferred":false},{"Name":"for of arr: few items","Code":"let result = 0;\r\nfor (const item of fewItemArr) {\r\n result \u002B= item;\r\n}","IsDeferred":false},{"Name":"native iter set: few items","Code":"let result = 0;\r\nlet val = null;\r\nconst iter = fewItemSet.values();\r\nwhile (!(val = iter.next()).done) {\r\n result \u002B= val.value;\r\n}","IsDeferred":false},{"Name":"for of arr: many items","Code":"let result = 0;\r\nfor (const item of manyItemArr) {\r\n result \u002B= item;\r\n}","IsDeferred":false},{"Name":"for of set: many items","Code":"let result = 0;\r\nfor (const item of manyItemSet) {\r\n result \u002B= item;\r\n}","IsDeferred":false},{"Name":"native loop arr: many items","Code":"let result = 0;\r\nfor (let i = manyItemArr.length; i--;) {\r\n result \u002B= manyItemArr[i];\r\n}","IsDeferred":false},{"Name":"native iter set: many items","Code":"let result = 0;\r\nlet val = null;\r\nconst iter = manyItemSet.values();\r\nwhile (!(val = iter.next()).done) {\r\n result \u002B= val.value;\r\n}","IsDeferred":false}]}