in reply to Re: Match speed of R in array procesing
in thread Match speed of R in array procesing
I haven't tried it yet but I would usually do it like this;
foreach $i (@Array_1) { $n = grep {$Array_2[$_] == "$i"} 0 .. $#Array_2; push(@m, $n); }
Once I have the indexes I just delete all the elements with that index in Array 2 and 3. I haven't used perl for a while but as far as I remember I was shocked how fast R does that sort of things. But that must be my not knowing perl enough.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Match speed of R in array procesing
by moritz (Cardinal) on Mar 28, 2012 at 16:08 UTC |