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

What does the data look like? Ie. Numeric or strings? If numeric, what range? If strings, what length and alphabet?

It is often possible to do this task more quickly or more compactly (or both) than using a hash; if the data is, or can be transformed into something amenable to other methods.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
  • 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:46 UTC
    both are arrays of strings

    English alphabet, and nothing incredibly long... length($string) could be > 100, but nothing past 400, and could be much smaller (ie: just a few characters)

      arrays of strings English alphabet, could be > 100,

      Then a hash is your best bet.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
      In the absence of evidence, opinion is indistinguishable from prejudice.