Improve performance of #uniq across a large number of nodes