News for hackers. Stuff that matters.
Re:Counting set bits in an interesting way by ChrisLomont on Saturday April 30, 2022 @03:05PM (#31218358)
>All modern CPUs have instructions for that

Not in the embedded space. Here's the architectures supported by gcc. I suspect most of them do not have popcount equivalent instructions. I've used quite a few of them and the only places I expect hardware support are on Intel and ARM. Rarely does another arch have it.

https://gcc.gnu.org/backends.html

There are no comments on this comment yet.