Merged has to keep track of the order of arguments, whereas union on a set is symmetrical (If two keys are identical according to equals, it should not matter for a set if you add the key from the left side or from the right side). So I think using the code from merged would decrease performance. 

I am aware that there is a large amount of duplication between HashSet and HashMap, but I think this can not really be tackled in time for 2.11, and in any case I do not know a way to remove the duplication without impacting performance.