{"ScriptPreparationCode":"var origNumItems = 1000000; // 1 million\r\nvar newNumItems = origNumItems * 2;\r\nvar origArr = [];\r\nvar newItems = [];\r\n\r\nfunction initArray(arr, numItems) {\r\n for (var i = 0; i \u003C= numItems; i\u002B\u002B) { arr.push(\u0060Item ${i}\u0060); }\r\n}\r\n\r\ninitArray(origArr, origNumItems);\r\ninitArray(newItems, newNumItems);\r\n","TestCases":[{"Name":"Set","Code":"var s = new Set(origArr);\r\n\r\nfor (const i in newItems) {\r\n s.add(i);\r\n}\r\nArray.from(s);","IsDeferred":false},{"Name":"Object","Code":"var obj = {};\r\nfor (const i in origArr) {\r\n obj[i] = true;\r\n}\r\n\r\nfor (const i in newItems) {\r\n obj[i] = true;\r\n}\r\n_.keys(obj)","IsDeferred":false},{"Name":"Lodash union","Code":"_.union(origArr, newItems)","IsDeferred":false}]}