psyco question
miller.paul.w at gmail.com
miller.paul.w at gmail.com
Sun Feb 3 13:06:04 EST 2008
Say I have a module with a function f in it, and I do
psyco.bind (f)
Is there any simple/easy/elegant way to retain a reference to the
*unoptimized* version of f so I can call them both and compare
performance? I've tried
f2 = copy.deepcopy (f)
psyco.bind (f)
but that doesn't work. Other ways I've thought of that might work
just seem silly (like putting the definition of f in a string, using
compile() to construct two code objects and using psyco.bind() on one
of them), so I'm wondering if there's a good way.
Thanks!
More information about the Python-list
mailing list