Tim Peters wrote at 2005-5-27 13:49 -0400:
> ...
>def lookup1(arg, _marker=object()):
>    return _marker
> ...
>_marker = object()
>def lookup3(arg):
>    return _marker
> ...
>lookup1  0.427597
>lookup3  0.404399

Do you understand why "lookup3" is faster than "lookup1"?

I had the "impression" that access to the function's local namespace
should be faster than any other variable access.

-- 
Dieter
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to