This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients python-dev, rhettinger, serhiy.storchaka
Date 2016-11-12.08:56:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478940964.2.0.145891217714.issue28665@psf.upfronthosting.co.za>
In-reply-to
Content
The argument about "harmonizing" doesn't look strong to me. Opcodes for locals use the SETLOCAL() macro which decrefs 
old value, while opcodes for nonlocals with your patches use the PyCell_SET() macro which doesn't.

But performance arguments look more weighty. I made benchmarks. fastcell.diff speeds up STORE_FAST by 40%, delete_deref.diff speeds up DELETE_DEREF by 50%. and concat_deref.diff speeds up string concatenating up to 15%. All these operations are rare in comparison with operations with locals or LOAD_DEREF, but the cognitive cost of the optimization is pretty low. All patches LGTM.

I only have doubts that such changes could be pushed in 3.6 at this stage. This is not bug fix and isn't tweaking new 3.6 feature.
History
Date User Action Args
2016-11-12 08:56:04serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, python-dev
2016-11-12 08:56:04serhiy.storchakasetmessageid: <1478940964.2.0.145891217714.issue28665@psf.upfronthosting.co.za>
2016-11-12 08:56:04serhiy.storchakalinkissue28665 messages
2016-11-12 08:56:03serhiy.storchakacreate