in reply to List processing performance
One thing that came to my mind is why don't you combine the two steps? So you'd end up w/ something like this:
my($self) = @_; my(%seen, %r); my @common = qw(a and at); @seen{@common} = (); for my $r (@words) { next if exists $seen{ lc $r }; $r{lc $r} = 1; } my @words = sort keys %r;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: List processing performance
by autark (Friar) on Jul 11, 2000 at 20:30 UTC | |
by btrott (Parson) on Jul 11, 2000 at 20:52 UTC | |
by chromatic (Archbishop) on Jul 11, 2000 at 23:32 UTC | |
by btrott (Parson) on Jul 12, 2000 at 07:08 UTC | |
|
RE: Re: List processing performance
by Odud (Pilgrim) on Jul 11, 2000 at 20:25 UTC |