Syntactic Confectionery Delight | |
PerlMonks |
Re: optimal way of comparing 2 arraysby jfroebe (Parson) |
on Oct 19, 2005 at 20:58 UTC ( [id://501425]=note: print w/replies, xml ) | Need Help?? |
Hi Narashima, I just saw your post... the best way is probably to benchmark the comparisons with your data set. I've written up a short script performing two of the comparisons that you list. You should be able to extend it very easily to test all the different variations of comparing two lists. My tests show that using two grep's is significantly faster than two foreach's. This may or may not be consistant with your real data. I would bet a pretty penny but not my life on it ;-) Maybe it will help you. Jason L. Froebe No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1
In Section
Seekers of Perl Wisdom
|
|