The timeit code disables the garbage collector while running. I ran
the tests on my system after adding the following lines to t1() and
t2().
del base
gc.collect()
Original timetest.py:
Using proxy
100 loops, best of 3: 4.45 msec per loop
Call to dummy proxy
100 loops, best of 3: 2.24
John Nagle wrote:
> "weakref.proxy()" probably should work that way.
> Weakref proxies are supposed to be transparent, but they're not
> quite transparent enough.
Submit a patch to SourceForge. Please don't use tabs in email/usenet
postings - use 4-space indents. "return" is not a function, a