or like
https://graphics.stanford.edu/~seander/bithacks.html
By keeping the decimal constants he diminishes the chance to be attributed.
or like
https://graphics.stanford.edu/~seander/bithacks.html
By keeping the decimal constants he diminishes the chance to be attributed.
I see it as a presentation of an efficient specialized function, just like the other bit hacks are (some already linked, one more, a whole book, here: http://www.hackersdelight.org/ ).
If it's is to impress the uninitiated, such are more probable to not know the hex codes too. For them is the decimal number the one less scary than the hex one. For others, converting back to hex is just a tiny annoyance, nothing more.
> (Disclaimer: It's not faster. It's not better. It's not production-quality code. It's just is and it was fun to make ;>)
It's a joke, a joke with some context, that you tell other people who know the context. Would you accuse people of intentionally obfuscating things when they riff on "the door is ajar" joke?
See cnvogel's attempt to measure it:
https://news.ycombinator.com/item?id=10513767
I also haven't accused anybody anything here.
Do you post similar rants to mechanical engineers building rube goldberg machines and electrical engineers building impractical extremely high voltage transformers?
The article author actually engineered an effective function for spreading out bits to bytes. I invite you to read the comments here that are actually mine and what's in them.