Michael Cuthbert added the comment:

@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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26904>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to