News for hackers. Stuff that matters.
Re:The power of two – fast division and modulo operations by Someone on Thursday April 25, 2024 @01:17PM (#40160338)
Better: https://libdivide.com/. That also optimizes division by non-powers of two.

https://ridiculousfish.com/blog/posts/labor-of-division-epis... explains the math behind it.

There are no comments on this comment yet.