in reply to Fastest way to merge (and de-dup) two large arrays?

Is preserving order important or irrelevant?

  • Comment on Re: Fastest way to merge (and de-dup) two large arrays?

Replies are listed 'Best First'.
Re^2: Fastest way to merge (and de-dup) two large arrays?
by technojosh (Priest) on Aug 11, 2016 at 19:08 UTC

      Then as Corion suggested hashing instead of smart matching is probably a great way to go for run time efficiency.

      I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
      I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious

      On a *nix system, I would try writing both arrays out to the same file and run

      sort -u

      on the file. Might be faster, might not...