in reply to Re: log4perl and efficiency
in thread log4perl and efficiency
I really think this has more to do with variable interpolation than it does with log4perl.
Comparing example A:
$self->{logger}->trace("total NbObsThis $i=$nbObservedThisNGram->[$i]; + nbObsAll $i=$nbObservedAllNGrams->[$i]; total=$totalObservedAll; nbE +xpected $i=$nbExpectedThis[$i]; chisq = $chiSquare[$i]");
with example B:
$self->{logger}->trace('no interpolation');
would be useful to demonstrate the difference in overhead between perl internals and log4perl. You're going to be stuck with interpolation performance no matter what logging framework you use.
In Section
Seekers of Perl Wisdom