[issue29882] Add an efficient popcount method for integers
Mark Dickinson
report at bugs.python.org
Wed Mar 22 17:45:13 EDT 2017
Mark Dickinson added the comment:
Many of those applications are really for bitstrings (chess bitboards, hamming distance), which aren't really the same thing as integers.
Nice find for the mathmodule.c case. I'd forgotten about that one (though according to git blame, apparently I'm responsible for checking it in). It's a fairly obscure corner case, though.
Overall, I'm -1 on adding this: I don't think it meets the bar of being useful enough to justify the extra method. I'd suggest that people needing this kind of efficient bitstring operation use a 3rd-party bitstring library instead.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29882>
_______________________________________
More information about the Python-bugs-list
mailing list