logoalt Hacker News

globular-toasttoday at 7:45 AM1 replyview on HN

Anyone interested in branch-free code might like the book Hacker's Delight. Lots of examples of stuff like this in there.


Replies

coldstartopstoday at 8:25 AM

Highly recommend. The exampels are in c/c++ and the same concepts can be ported to other languages like golang.

My favorite part of it is Chapter 2 the bit manipulation tricks.