{"ScriptPreparationCode":"var $ = window.$;\r\nvar _ = window._;\r\nvar myArr = [1, 2, 1, 3, 1, 4];\r\n\r\nvar longArr = [];\r\n \r\nfor (let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n longArr.push(Math.floor(Math.random() * 100));\r\n}","TestCases":[{"Name":"jQuery","Code":"var result = $.unique( myArr );\r\nvar result2 = $.unique( longArr );","IsDeferred":false},{"Name":"Lodash","Code":"var result = _.uniq( myArr );\r\nvar result2 = _.uniq( longArr );","IsDeferred":false},{"Name":"Flags","Code":"var flags = [],\r\n output = [],\r\n l = myArr.length,\r\n i;\r\nfor (i = 0; i \u003C l; i\u002B\u002B) {\r\n if (flags[myArr[i]]) continue;\r\n flags[myArr[i]] = true;\r\n output.push(myArr[i]);\r\n}\r\n\r\nvar flags2 = [],\r\n output2 = [],\r\n l2 = myArr.length,\r\n i2;\r\nfor (i2 = 0; i2 \u003C l2; i2\u002B\u002B) {\r\n if (flags2[longArr[i2]]) continue;\r\n flags2[longArr[i2]] = true;\r\n output2.push(longArr[i2]);\r\n}","IsDeferred":false},{"Name":"JS Func","Code":"var unique = myArr.filter(function (itm, i, a) {\r\n return i == myArr.indexOf(itm);\r\n });\r\n\r\nvar unique2 = longArr.filter(function (itm, i, a) {\r\n return i == longArr.indexOf(itm);\r\n });\r\n\r\n\r\n","IsDeferred":false},{"Name":"Set","Code":"var unique = [...(new Set(myArr))];\r\n\r\nvar unique2 = [...(new Set(longArr))];","IsDeferred":false}]}