in reply to Performance revision needed
if ($Conf[7] =~ /NO/i) { ... elsif($Conf[7] =~ /YES/i) {
@Conf appears to be setup outside of this loop. Evaluate this once and save the result instead of parsing a regex every time through the loop.
$attrID =~ s/\s*//g; $port =~ s/\s*//g;
I think replacing the '*' with '+' might help here.
$val = join("", $val, $port);
How about $val .= $port?
push @Data, [@entry];
Since @entry is a lexical variable, you should be able to use \@entry instead of [@entry] which needs to make a copy of the list.
Unless I'm missing something, both blocks of code do the same thing. It might be better from a maintenance standpoint to check if either condition is true and only have the block once.
--- print map { my ($m)=1<<hex($_)&11?' ':''; $m.=substr('AHJPacehklnorstu',hex($_),1) } split //,'2fde0abe76c36c914586c';
|
|---|