[Python-Dev] nested scopes confusion
Tue, 4 Dec 2001 21:28:17 +0100
> But the performance characteristics of class vs. function is really
> the bottleneck of your application? Are you sure that nested fuctions
> are really cheaper?
Is seems do.
Here's a simple test:
return lambda self, *args: index
def test(self, *args):
test = Method(42)
a = A()
c = C()
Calling a.test() takes 3.3 microseconds, and c.test() takes 3.16 microseconds.