{"ScriptPreparationCode":"var arr = Array.from({ length: 10000 }, Math.random);\r\nvar TARGET_VALUE = 0.95;\r\n\r\nfunction* filter(iter, f) {\r\n for (const it of iter) {\r\n if (f) {\r\n yield it;\r\n }\r\n }\r\n}","TestCases":[{"Name":"Array.filter","Code":"return arr.filter(x =\u003E x \u003E= TARGET_VALUE);","IsDeferred":false},{"Name":"for, continue","Code":"const farr = [];\r\nfor (let i = 0, len = arr.length; i \u003C len; \u002B\u002Bi) {\r\n if (arr[i] \u003C TARGET_VALUE) {\r\n continue;\r\n }\r\n farr.push(arr[i]);\r\n}\r\nreturn farr;","IsDeferred":false},{"Name":"for, condition","Code":"const farr = [];\r\nfor (let i = 0, len = arr.length; i \u003C len; \u002B\u002Bi) {\r\n if (arr[i] \u003E= TARGET_VALUE) {\r\n farr.push(arr[i]);\r\n }\r\n}\r\nreturn farr;","IsDeferred":false},{"Name":"for..of","Code":"const farr = [];\r\nfor (const x of arr) {\r\n if (x \u003E= TARGET_VALUE) {\r\n farr.push(x);\r\n }\r\n}\r\nreturn farr;","IsDeferred":false},{"Name":"Array.reduce","Code":"return arr.reduce(\r\n (a, b) =\u003E {\r\n if (b \u003E= TARGET_VALUE) {\r\n a.push(b);\r\n }\r\n return a;\r\n },\r\n [],\r\n);","IsDeferred":false},{"Name":"generator, spread","Code":"return [...filter(arr, x =\u003E x \u003E= TARGET_VALUE)];","IsDeferred":false}]}