by interroboink · 3y ago · 0 comments
It just highlights to me how the job of "programmer" can be many things, depending on your domain. One could argue that a goal of programming is to build higher abstractions so you don't need to manipulate bits in order to express yourself.
But that aside, I enjoy this stuff, so here are some links for others interested:
* A neat SO post about implementing "popcount" using SWAR trickery: https://stackoverflow.com/questions/109023/count-the-number-...
* Good collections of bit hacks:
** https://graphics.stanford.edu/~seander/bithacks.html (also mentioned in the article's comments)
Agreed, though I'd argue different languages entreat different kinds of knowledge. That's why there's value in having experience in many.
> One could argue that a goal of programming is to build higher abstractions so you don't need to manipulate bits in order to express yourself.
Could be; though I'd argue just because those abstractions are there, it's still good to know how and why they work. That reveals some things about the language which I think influences the subtle choices you make every day.