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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]