{"ScriptPreparationCode":"var watched = [];\r\nvar ignored = [];\r\n\r\nfor(let i = 0; i \u003C 10000; i\u002B\u002B){watched.push({programId:Math.random()});}\r\nfor(let i = 0; i \u003C 10000; i\u002B\u002B){ignored.push({programId:Math.random()});}","TestCases":[{"Name":"naive compare","Code":"watched.filter(obj =\u003E {\r\n return !ignored.some(item =\u003E item.programId === obj.programId);\r\n });","IsDeferred":false},{"Name":"compare with pop","Code":"watched.filter(wObj =\u003E\r\n !ignored.some((iObj, ndx) =\u003E {\r\n if (iObj.programId === wObj.programId) {\r\n ignored[ndx] = ignored.pop();\r\n return true;\r\n }\r\n return false;\r\n })\r\n );","IsDeferred":false},{"Name":"len trimming","Code":"let ml = ignored.length -1;\r\nwatched.filter(wObj =\u003E\r\n !ignored.some((iObj, ndx) =\u003E {\r\n if (iObj.programId === wObj.programId) {\r\n ignored[ndx] = ignored[ml];\r\n\t\t\tignored.length--;\r\n\t\t\tml--;\r\n return true;\r\n }\r\n return false;\r\n })\r\n );","IsDeferred":false}]}