in reply to Fastest way to merge (and de-dup) two large arrays?
Does something like this fit in memory with your data?
#!/usr/bin/perl # http://perlmonks.org/?node_id=1169599 use strict; use warnings; my @data = 1..6e4; # fake strings my @rows = 1+3e4..6e5+3e4; # fake strings my %combined; @combined{@data, @rows} = (); @data = keys %combined; print "size = " . @data, "\n";
|
|---|