{"ScriptPreparationCode":"var data = []\r\n\r\nfunction getRandomDate() {\r\n const startMillis = new Date(\u00272020-06-02T00:00:00.000Z\u0027).getTime();\r\n const endMillis = new Date().getTime();\r\n const randomMillis = startMillis \u002B Math.random() * (endMillis - startMillis);\r\n const randomDate = new Date(randomMillis);\r\n\r\n return randomDate;\r\n}\r\n\r\nfor (var i = 0; i \u003C 14000; i\u002B\u002B) {\r\n data.push({ customerId: \u0060CTM-${i % 10}\u0060, worklistId: \u0060WL-${i % 100}\u0060, createdDateTime: getRandomDate() });\r\n}","TestCases":[{"Name":"slow","Code":"var result = R.uniqBy(\r\n R.props([\u0027worklistId\u0027, \u0027customerId\u0027]),\r\n [...data].sort(\r\n (a, b) =\u003E new Date(a.createdDateTime).getTime() - new Date(b.createdDateTime).getTime(),\r\n ),\r\n )","IsDeferred":false},{"Name":"new","Code":"var result = R.uniqWith(\r\n (a, b) =\u003E a.customerId === b.customerId \u0026\u0026 a.worklistId === b.worklistId,\r\n [...data].sort(\r\n (a, b) =\u003E new Date(a.createdDateTime).getTime() - new Date(b.createdDateTime).getTime(),\r\n ),\r\n )","IsDeferred":false},{"Name":"new2","Code":"var result = R.uniqWith(\r\n (a, b) =\u003E a.customerId === b.customerId \u0026\u0026 a.worklistId === b.worklistId,\r\n data.sort(\r\n (a, b) =\u003E a.createdDateTime - b.createdDateTime,\r\n ),\r\n )","IsDeferred":false},{"Name":"nospread","Code":"var result = R.uniqWith(\r\n (a, b) =\u003E a.customerId === b.customerId \u0026\u0026 a.worklistId === b.worklistId,\r\n [...data].sort(\r\n (a, b) =\u003E a.createdDateTime - b.createdDateTime,\r\n ),\r\n )","IsDeferred":false},{"Name":"nodate","Code":"var result = R.uniqWith(\r\n (a, b) =\u003E a.customerId === b.customerId \u0026\u0026 a.worklistId === b.worklistId,\r\n data.sort(\r\n (a, b) =\u003E new Date(a.createdDateTime).getTime() - new Date(b.createdDateTime).getTime(),\r\n ),\r\n )","IsDeferred":false}]}