[OT] memory management -- was Re: itoa'd you so?

Levi Pearson levi at cold.org
Thu Sep 20 01:04:32 MDT 2007


"Bryan Sant" <bryan.sant at gmail.com> writes:
> A blessing and a curse.  Macro-based debugging has merit, but nasty
> black magic macros used for non-debugging purposes can be a bear to
> debug.  I'd also argue that the single jump instruction that is
> produced with an "if (debug) {" test one would use in a language that
> doesn't support macros doesn't even register on the performance
> overhead meter.  This is a total non-issue as far as performance is
> concerned.  However, removing the code all together does reduce the
> size of your binary image which is kind of nice.

If debug is defined as a constant, the code ought to be completely
eliminated by any reasonable compiler.  Why keep dead code around?
C-style preprocessing is pretty much the worst possible way to do most
of the things it does, but at least it does them in a fairly simple
and consistent manner.

                --Levi



More information about the PLUG mailing list