Message280643
| 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:04 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, python-dev |
| 2016年11月12日 08:56:04 | serhiy.storchaka | set | messageid: <1478940964.2.0.145891217714.issue28665@psf.upfronthosting.co.za> |
| 2016年11月12日 08:56:04 | serhiy.storchaka | link | issue28665 messages |
| 2016年11月12日 08:56:03 | serhiy.storchaka | create |
|