{"ScriptPreparationCode":"var fewItemSet = new Set([1, 2, 3]);\r\nvar manyItemSet = new Set(Array.from({ length: 1000 }, (_, i) =\u003E i));\r\n","TestCases":[{"Name":"for of: few items","Code":"let result = 0;\r\nfor (const item of fewItemSet) {\r\n result \u002B= item;\r\n}","IsDeferred":false},{"Name":"for of: many items","Code":"let result = 0;\r\nfor (const item of manyItemSet) {\r\n result \u002B= item;\r\n}\r\n","IsDeferred":false},{"Name":"convert to array: few items","Code":"let result = 0;\r\nconst arr = Array.from(fewItemSet);\r\nfor (let i = arr.length; i--;) {\r\n result \u002B= arr[i];\r\n}","IsDeferred":false},{"Name":"convert to array: many items","Code":"let result = 0;\r\nconst arr = Array.from(manyItemSet);\r\nfor (let i = arr.length; i--;) {\r\n result \u002B= arr[i];\r\n}","IsDeferred":false},{"Name":"native iterator: 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":"native iterator: 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}\r\n","IsDeferred":false},{"Name":"native iterator w/ size: few items","Code":"let result = 0;\r\nlet iter = fewItemSet.values();\r\nfor (let i = fewItemSet.size; i--;) {\r\n result \u002B= iter.next().value;\r\n}","IsDeferred":false},{"Name":"native iterator w/ size: many items:","Code":"let result = 0;\r\nlet iter = manyItemSet.values();\r\nfor (let i = manyItemSet.size; i--;) {\r\n result \u002B= iter.next().value;\r\n}","IsDeferred":false},{"Name":"forEach: few items","Code":"let result = 0;\r\nfewItemsSet.forEach((item) =\u003E { result \u002B= item })\r\n","IsDeferred":false},{"Name":"forEach: many items","Code":"let result = 0;\r\nmanyItemsSet.forEach((item) =\u003E { result \u002B= item })\r\n","IsDeferred":false}]}