gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUe-dev] Changing gDebug()


From: Jason Cater
Subject: Re: [GNUe-dev] Changing gDebug()
Date: Sat, 10 Sep 2005 20:47:06 -0500
User-agent: KMail/1.8

That's s(l)ick enough for my approval!

I like it. I've always wondered how we could avoid the overhead of debug calls 
when we weren't actually using the debugging. 

-- Jason 



On Saturday 10 September 2005 8:04 pm, James Thompson wrote:
> I was thinking about gDebug calls tonight (I'm sick like that :)
>
> If we were to alter our gDebug() calls to *always* return a value of True.
>
> Then in our code instead of doing
>
> gDebug(15,"hi")
>
> we do
>
> assert gDebug(15,"hi")
>
> When optimization is requested (python -O) assert statements are left out
> of the generated code.  So we would regain all the time lost to those
> function calls.  We would also be able to put gDebug calls in places where
> we've removed them in the past to increase performance.
>
> A quick test with a hacked forms show this works.
>
> What do people think?
>
> Take Care,
> James
>
>
> _______________________________________________
> Gnue-dev mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnue-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]