4 ms·
Most compilers already do this. For the theory behind it, see Hank Warren's *Hacker's Delight", a book that ought to be in everyone's library.
by drallison 16y ago
Most compilers already do this. For the theory behind it, see Hank Warren's *Hacker's Delight", a book that ought to be in everyone's library.
- tptacek 16y agoThird sentence on the page: Compilers usually do this, but only when the divisor is known at compile time. libdivide allows you to take advantage of it at runtime.
- pasbesoin 16y ago"Hacker's Delight" happens to be in O'Reilly's Safari, I'm happy to notice: http://my.safaribooksonline.com/book/networking/security/0201914654?bookview=overview http://my.safaribooksonline.com/book/networking/security/020... Thanks for the nudge to check; you've put another item on my reading list.