in reply to Script far too slow with large files - wisdom needed!
You can gain some time by using a search for id that stops when it finds any match instead of continuing thru the whole list.
use List::Util qw/any/; ... # if ($A+$B == 2 && grep {$_ eq $TI} @IDS){ if ($A && $B && any { $_ eq $TI } @IDS) {
Update: toolic's idea is better.
|
|---|