{"ScriptPreparationCode":"var testArray = [];\r\n\r\n// Create test data with duplicate tokenIds\r\nfor (let i = 0; i \u003C 10000; i\u002B\u002B) {\r\n testArray.push({\r\n tokenId: Math.floor(Math.random() * 1000)\r\n });\r\n}","TestCases":[{"Name":"reduce","Code":"console.time(\u0027reduce\u0027);\r\nvar tokenIdsReduce = testArray.reduce((acc, { tokenId }) =\u003E {\r\n if (!acc.includes(tokenId)) {\r\n acc.push(tokenId);\r\n }\r\n return acc;\r\n}, []);\r\nconsole.timeEnd(\u0027reduce\u0027);\r\nconsole.log(\u0027Token IDs (reduce):\u0027, tokenIdsReduce);","IsDeferred":false},{"Name":"map-set","Code":"console.time(\u0027map-set\u0027);\r\nvar tokenIdsMapSet = [...new Set(testArray.map(({ tokenId }) =\u003E tokenId))];\r\nconsole.timeEnd(\u0027map-set\u0027);\r\nconsole.log(\u0027Token IDs (map-set):\u0027, tokenIdsMapSet);","IsDeferred":false}]}