> "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
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:16 MST