http://www.perlmonks.org?node_id=1015951


in reply to Speed up hash initialization loop

write $profEvntVar->{$customProf} only once, assign the ref to a lexical, then deref the lexical each time. You cut 2 lookups to 1 on each line.