in reply to Re: Unique Array Items
in thread Unique Array Items
I actually don't know how it would compare in terms of speed, but it would use a fair bit less memory. (I just checked the process size of "=> 0" vs. "=> undef", and the latter was about 1 MB smaller on a set of 100K hash keys.)... keys %{ map { $_ => undef } @array }; # not 0
|
|---|