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 niklasf
Recipients Jim Fasarakis-Hilliard, mark.dickinson, niklasf
Date 2017-03-22.21:38:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490218685.13.0.617620912645.issue29882@psf.upfronthosting.co.za>
In-reply-to
Content
Searching popcount in Python files on GitHub yields
a considerable number of examples:

https://github.com/search?utf8=%E2%9C%93&q=popcount+extension%3Apy&type=Code

Perhaps intresting:

* In CPython itself: See count_set_bits in
  Modules/mathmodule.c

* Domain specific applications: Bitboards in Chess,
  fairly shuffling cards in Poker, comparing molecules

* Size of bitsets (see bitarray and bitsets I listed above).
  Probably for this reason also as a first class citizen
  in Redis: https://redis.io/commands/bitcount.

Probably most important:

* As the Hamming Distance:
  https://en.wikipedia.org/wiki/Hamming_distance#History_and_applications

---

Btw. not a concrete application. I just stumbled upon this.
popcnt was considered important enough to be included in the
rather limited WebAssembly instruction set:
https://github.com/WebAssembly/spec/raw/master/papers/pldi2017.pdf
History
Date User Action Args
2017-03-22 21:38:05niklasfsetrecipients: + niklasf, mark.dickinson, Jim Fasarakis-Hilliard
2017-03-22 21:38:05niklasfsetmessageid: <1490218685.13.0.617620912645.issue29882@psf.upfronthosting.co.za>
2017-03-22 21:38:05niklasflinkissue29882 messages
2017-03-22 21:38:04niklasfcreate