in reply to Re: Fastest way to merge (and de-dup) two large arrays?
in thread Fastest way to merge (and de-dup) two large arrays?
This was where I was going as well, but I was going to suggest hashing the larger array instead of the smaller one. I guess I assumed it would be faster to do fewer loop iterations checking for the existence of a key in a larger hash than the other way around. Is this something that would have to be tested on a data set to determine for sure, or is it a for sure thing to do it faster the way you show?
I ask because I've done this exact thing before and I'm curious for an explanation on the efficiency difference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Fastest way to merge (and de-dup) two large arrays?
by Corion (Patriarch) on Aug 11, 2016 at 19:12 UTC | |
by SimonPratt (Friar) on Aug 12, 2016 at 07:59 UTC | |
by perldigious (Priest) on Aug 12, 2016 at 13:52 UTC |