Author rhettinger
Recipients python-dev, rhettinger, serhiy.storchaka
Date 2016-06-27.22:17:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1467065849.97.0.958292285224.issue27255@psf.upfronthosting.co.za>
In-reply-to
Content
The BUILD_SLICE pairing with BINARY_SUBSCR has a tight conceptual linkage with the lookup case dominating use patterns over slice deletion and slice assignment.  IIRC, I passed on that pairing long ago because even though the predictive power was good, it didn't come up much (a very, very low percentage of executed op-codes in any real programs).  That would mean the user wouldn't be likely to see any benefit and I worried about the cost (global prediction tables have a finite size and are subject to aliased false positives, so when in doubt, it is better to not do it at all.)  

The UNPACK_SEQUENCE pairing with STORE_FAST had the opposite issue.  The two arise in real code often enough to be interesting, but I wasn't as confident that it wasn't competing with alternative successors like STORE_NAME or attribute storage.  Here, the statistics are heavily influenced by whatever is being profiled.  Given that I wasn't confident in the pairing, I passed on it.

That said, there's nothing terribly wrong with either, so it is hard to veto them.  Now as well as back when the opcode predictions were first studied, I remain -0 on both pairings.  

In general, we should have a bias towards there being relatively few predictions (each one adds size to the generated code, adds load to the branch prediction tables, and adds to the cognitive load of anyone modifying the compiler, the peephole optimizer, or adding new opcodes) and there should be a preference to leave out cases where there is doubt.

I'll leave it to you to decide whether either one of these should go in (I just wanted you to know why they weren't included in the first place).
History
Date User Action Args
2016-06-27 22:17:30rhettingersetrecipients: + rhettinger, python-dev, serhiy.storchaka
2016-06-27 22:17:29rhettingersetmessageid: <1467065849.97.0.958292285224.issue27255@psf.upfronthosting.co.za>
2016-06-27 22:17:29rhettingerlinkissue27255 messages
2016-06-27 22:17:29rhettingercreate