Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on How do compilers optimize divisions?.
http://ridiculousfish.com/blog/posts/labor-of-division-episo...
The same author wrote a library for doing this (and more; it also uses bit shifts) at runtime: http://libdivide.com
Of course, that only makes sense if you know you will do lots of divisions by the same number
There are no comments on this comment yet.
http://ridiculousfish.com/blog/posts/labor-of-division-episo...
http://ridiculousfish.com/blog/posts/labor-of-division-episo...
http://ridiculousfish.com/blog/posts/labor-of-division-episo...
The same author wrote a library for doing this (and more; it also uses bit shifts) at runtime: http://libdivide.com
Of course, that only makes sense if you know you will do lots of divisions by the same number