[Python-Dev] PEP 3121, 384 Refactoring Issues
stefan at bytereef.org
Fri Jul 11 13:46:27 CEST 2014
Brett Cannon <brett at python.org> wrote:
> No, the PEPs were fine and were accepted properly. A huge portion of the open
> issues are from Robin Schreiber who as part of GSoC 2012 -- https://
> 5668600916475904 -- went through and updated the stdlib to follow the new
> practices introduced in the two PEPs. Not sure if there was some policy
> decision made that updating the code wasn't worth it or people simply didn't
> get around to applying the patches.
Due to the frequent state lookups there is a performance problem though,
which is quite significant for _decimal. Otherwise I think I would have
implemented the changes already.
I think for speed sensitive applications it may be an idea to create
a new C function (METH_STATE flag) which gets the state passed in by
Other than that, looking up the state inside the module but cache it (like
it's done for the _decimal context) also has reasonable performance.
Also I hit the same issues that Eli mentioned here a while ago:
More information about the Python-Dev