{"ScriptPreparationCode":"function createObjectsArray(size) {\r\n return Array.from({ length: size }, (_, i) =\u003E ({ id: i \u002B 1 }));\r\n}\r\n\r\nfunction generateRandomArray(size) {\r\n const arr = Array.from({ length: size }, (_, i) =\u003E i \u002B 1);\r\n return arr.sort(() =\u003E Math.random() - 0.5);\r\n}\r\n\r\nfunction removeWithFilter(array, ids) {\r\n ids.forEach((id) =\u003E {\r\n array = array.filter((item) =\u003E item.id !== id);\r\n });\r\n}\r\n\r\nfunction removeWithFindIndexAndSplice(array, ids) {\r\n ids.forEach((id) =\u003E {\r\n const index = array.findIndex((item) =\u003E item.id === id);\r\n if (index !== -1) array.splice(index, 1);\r\n });\r\n}\r\n\r\nvar testSize1 = 10;\r\nvar testSize2 = 100;\r\nvar testSize3 = 1000;\r\nvar testSize4 = 10000;\r\n\r\nvar randomIds1 = generateRandomArray(testSize1);\r\nvar randomIds2 = generateRandomArray(testSize2);\r\nvar randomIds3 = generateRandomArray(testSize3);\r\nvar randomIds4 = generateRandomArray(testSize4);\r\n\r\nvar func1Array1 = createObjectsArray(testSize1);\r\nvar func1Array2 = createObjectsArray(testSize2);\r\nvar func1Array3 = createObjectsArray(testSize3);\r\nvar func1Array4 = createObjectsArray(testSize4);\r\n\r\nvar func2Array1 = createObjectsArray(testSize1);\r\nvar func2Array2 = createObjectsArray(testSize2);\r\nvar func2Array3 = createObjectsArray(testSize3);\r\nvar func2Array4 = createObjectsArray(testSize4);","TestCases":[{"Name":"Filter 10","Code":"removeWithFilter(func1Array1, randomIds1)","IsDeferred":false},{"Name":"Filter 100","Code":"removeWithFilter(func1Array2, randomIds2)","IsDeferred":false},{"Name":"Filter 1000","Code":"removeWithFilter(func1Array3, randomIds3)","IsDeferred":false},{"Name":"Filter 10000","Code":"removeWithFilter(func1Array4, randomIds4)","IsDeferred":false},{"Name":"FindIndex \u002B Splice 10","Code":"removeWithFindIndexAndSplice(func2Array1, randomIds1)","IsDeferred":false},{"Name":"FindIndex \u002B Splice 100","Code":"removeWithFindIndexAndSplice(func2Array2, randomIds2)","IsDeferred":false},{"Name":"FindIndex \u002B Splice 1000","Code":"removeWithFindIndexAndSplice(func2Array3, randomIds3)","IsDeferred":false},{"Name":"FindIndex \u002B Splice 10000","Code":"removeWithFindIndexAndSplice(func2Array4, randomIds4)","IsDeferred":false}]}