{"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(wObj =\u003E {\r\n return !ignored.some((iObj, ndx) =\u003E iObj.programId === wObj.programId);\r\n});","IsDeferred":false},{"Name":"some; swap and shorten len","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].programId = ignored[ml--].programId;\r\n ignored.length = ml;\r\n return true;\r\n }\r\n return false;\r\n })\r\n);\r\n","IsDeferred":false},{"Name":"for; swap and shorten len","Code":"let ml = ignored.length -1;\r\nwatched.filter(wObj =\u003E {\r\n for (let i = 0; i \u003C ml; i\u002B\u002B) {\r\n if (wObj.programId === ignored[i].programId) {\r\n ignored[i].programId = ignored[ml--].programId;\r\n return false;\r\n }\r\n }\r\n return true;\r\n});","IsDeferred":false}]}