{"ScriptPreparationCode":"var length = 10000;\r\nvar value = 2000;\r\nvar sublength = 15;\r\nvar list = Array.from({length: length}, () =\u003E Math.floor(Math.random() * value));\r\nvar indices = Array.from({length: sublength}, () =\u003E Math.floor(Math.random() * length));\r\n","TestCases":[{"Name":"for push","Code":"var filtered = [];\r\n\r\nfor (idx of indices) {\r\n filtered.push(list[idx])\r\n}","IsDeferred":false},{"Name":"reduce push","Code":"filtered = indices.reduce((res, idx) =\u003E {\r\n res.push(list[idx]);\r\n return res;\r\n}, []);","IsDeferred":false},{"Name":"filter some","Code":"filtered = list.filter((item, idx) =\u003E {\r\n return indices.some((index) =\u003E index === idx);\r\n});","IsDeferred":false}]}