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
> [email protected]
> http://lists.gnu.org/mailman/listinfo/gnue-dev


_______________________________________________
Gnue-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue-dev

Reply via email to