harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [classlib] logging from within our implementation
Date Tue, 30 May 2006 20:56:19 GMT
On Wednesday 31 May 2006 00:46 Ivan Volosyuk wrote:
> > Any good behaving optimizing runtime would inline empty methods into
> > nothing and therefore no performance impact would be made.
> Excelent! This is much better and simplier.
> public final class CLogger {
>    public static void msg(Object... ) {..}
> }
> Hmm, I see one drawback of this approach: arguments will still be
> evaluated even if logger itself will be empty. So, some care needed to
> maintain performance with such logger.

If dead code elimination is done after inlining, then most likely code like 
string concatination and stuff like that would be deleted as well.

Disclaimer: I am not a compiler expert, so I may be wrong.

Gregory Shimansky, Intel Middleware Products Division

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message