Remove dependency on List::MoreUtils
Current LMU maintainer was proven unresponsive to concerns about the towering
complexity of that modules dependency chain. Use a pure-perl implementation
of uniq() compatible with the version in LMU 0.4xx series
The slowdown, while noticeable, is of no consequence to the larger codebase
~$ dd if=/dev/urandom bs=512 count=1 2>/dev/null | perl -0777 -Ilib -MSQL::Translator::Utils -MList::MoreUtils::XS -MBenchmark::Dumb -e '
my @list = map ord, split "", <>;
Benchmark::Dumb::cmpthese( 0.0001 => {
lmu => sub {
List::MoreUtils::uniq(@list);
},
pp => sub {
SQL::Translator::Utils::uniq(@list);
}
})
'
Rate pp lmu
pp 2838.17+-0.28/s -- -35.2%
lmu 4381.99+-0.44/s 54.4% --