A counter example is trees & tries. These are immensely useful structures for many purposes, and there are quite a few flavours of both on CPAN. But, for the most part, they are almost useless for anything but experimentation and the most trivial of applications. They are, mostly, based upon using hashes to construct the trees, with the result that the are slow, clumsy and hugely memory hungry.
I'm guessing that you mean that tries are implemented with hashes. I can't image trees implemented with arrays being that much more memory hungary than arrays alone. Sure, operations on trees will be slower than similar operations on arrays, but that's mostly comparing perl vs. C.
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
my $MAX = 10000;
my $tree = make_tree($MAX/2,undef,undef);
for(my $x=1;$x<$MAX;$x++)
{
$tree = insert(int(rand($MAX)), $tree);
}
print "sum = ", sum_tree($tree), "\n";
#print Dumper $tree;
sub sum_tree
{
my $tree = shift;
return 0 if not defined($tree);
return node($tree) + sum_tree(right($tree)) + sum_tree(left($tree)
+);
}
sub insert
{
(my $elem, my $tree) = @_;
if(not defined($tree)){ return make_tree($elem, undef, undef); }
my $curr = node($tree);
if( $elem == $curr) { return $tree; }
elsif($elem < $curr)
{
return make_tree($curr,
insert($elem,left($tree)),
right($tree));
}
elsif($elem > $curr)
{
return make_tree($curr,
left($tree),
insert($elem,right($tree)));
}
}
sub make_tree { [$_[0], $_[1], $_[2]] }
sub node { $_[0]->[0] }
sub left { $_[0]->[1] }
sub right { $_[0]->[2] }