28 May
2005
28 May
'05
8:56 a.m.
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