Author mark.dickinson
Recipients Jim Fasarakis-Hilliard, Mark.Shannon, casevh, gbtami, mark.dickinson, niklasf, njs, rhettinger, serhiy.storchaka, tim.peters, vstinner
Date 2020-05-31.13:46:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
A couple of other data points:

- Swift has nonzeroBitCount:

- Rust has count_ones:

- Go's math/bits package has OnesCount

- The closest thing in Mathematica appears to be DigitCount, which isn't base-specific.

@Mark Shannon: what name would you suggest, and why? The term "population count" feels too non-obvious and specialist to me, and anything involving "Hamming" likewise.

"count_ones" isn't obviously a bit operation.

Date User Action Args
2020-05-31 13:46:50mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, vstinner, casevh, njs, Mark.Shannon, serhiy.storchaka, Jim Fasarakis-Hilliard, niklasf, gbtami
2020-05-31 13:46:50mark.dickinsonsetmessageid: <>
2020-05-31 13:46:50mark.dickinsonlinkissue29882 messages
2020-05-31 13:46:49mark.dickinsoncreate