http://qs321.pair.com?node_id=654037


in reply to Re: Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
in thread Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?

curiously, (the pure-perl version of) List::MoreUtils::uniq uses
map { $h{$_}++ == 0 ? $_ : () } @_;
rather than
grep { !$h{$_}++ } @_;
i wonder, a simple preference or are there interesting micro-optimizations in the map verison?