> 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: def Method(index): return lambda self, *args: index class A: def test(self, *args): return 5 class C: test = Method(42) a = A() c = C() Calling a.test() takes 3.3 microseconds, and c.test() takes 3.16 microseconds. Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4