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 mscuthbert
Recipients mscuthbert, rhettinger, serhiy.storchaka, wolma
Date 2016-05-03.09:11:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462266706.02.0.0562781672988.issue26904@psf.upfronthosting.co.za>
In-reply-to
Content
@wolma -- you're right, that the inplace __iand__ version of Counter is substantially faster -- it is still slower than the current code (since it is still basically a superset of it).  However, testing shows that it is close enough to the current code as to potentially be worth using it, in order to avoid the same issue that arose here (a small speed tweak in this code prevents it from taking advantage of larger improvements later).

If you think that is worth changing, I can make a new patch that incorporates it.  I don't have formal benchmarks on it, but quick tests show a 10% regression from the current speedups to using &= instead of the custom summation method.
History
Date User Action Args
2016-05-03 09:11:46mscuthbertsetrecipients: + mscuthbert, rhettinger, serhiy.storchaka, wolma
2016-05-03 09:11:46mscuthbertsetmessageid: <1462266706.02.0.0562781672988.issue26904@psf.upfronthosting.co.za>
2016-05-03 09:11:46mscuthbertlinkissue26904 messages
2016-05-03 09:11:45mscuthbertcreate