RE: Debug levels

From: Chemolli Francesco (USI) <ChemolliF@dont-contact.us>
Date: Tue, 28 Aug 2001 20:03:33 +0200

> "Chemolli Francesco (USI)" wrote:
>
> > In unrelated news, I'm beginning to mumble about dirty CPP
> tricks which
> > would
> > allow to specify a maximum compiled-in debug level, saving CPU
> > clicks by not performing many debug level comparisions.
> > Do you think such an hack would be useful?
>
> Only maginally I think. The debug() maco is very short as it
> is, doing a
> static compare which in most cases shold be evaluated very
> early in the
> CPU pipeline. But on the other hand it is used fairly frequently so it
> probably adds up to something.
>
> Adding an option to eleminate the most detailed debug outputs
> should be
> fairly easy. Simply have the macro expand into a condition
> including the
> limit and the compiler should optimize away the whole statement.

I did just that in the attached patch.
It compiles cleanly.

-- 
	/kinkie 

Received on Tue Aug 28 2001 - 11:54:59 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:16 MST