Remix.run Logo
spencerflem 16 hours ago

What's wrong with that? This is often a single CPU instruction and a lot of languages have support for it, including python

https://en.m.wikipedia.org/wiki/Hamming_weight

wslh 14 hours ago | parent [-]

It was a positive comment about Swift showing the batteries included there. It is not normal to have such high-level methods for low-level stuff like bits in an integer. Clearly logical operations and rotation is included in all popular languages.

spencerflem 14 hours ago | parent [-]

Python has bit_count() as of semi recently :)

But I gotcha now, mistook "I wonder" as "I suspect it's not"