in reply to Re^3: better union of sets algorithm?
in thread better union of sets algorithm?

You can do slightly better than what you just suggested for a mergesort of k lists (when k is not super-small).
Yes, but it's much harder to code off the top of my head. :)
From perldoc sort:
           use sort 'stable';          # guarantee stability
           use sort '_quicksort';      # use a quicksort algorithm
           use sort '_mergesort';      # use a mergesort algorithm
           use sort 'defaults';        # revert to default behavior
           no  sort 'stable';          # stability not important