A faster way to compute signed 64-bit floor division by constants

26 points by benjoffe 13 hours ago on lobsters | 4 comments

lyxia | 12 hours ago

There is so much good stuff in this post! Love the Barack Obama quote.

Reminds me of this short note by Daan Leijen about the various forms of division, how they relate to each other, and what languages implement which.

Also the epic wikipedia article on the modulo operator

[OP] benjoffe | 8 hours ago

Thanks! I find myself getting more and more carried away throwing in content to these blog posts, and they end up taking ages to finish. Am going to try to get a few short ones out before AI sweeps away all this low hanging fruit.

classichasclass | 8 hours ago

Don't worry about it. I think the long-form blog post is a lost art, and I'm trying to revive it myself. There is a niche for the reader who wants a deep, deep dive.