3 ms·
A little self-promotion: I've written a blog post to answer the question that this one ends with (how to optimize divisions by constant integers): https://ruben
by rustybolt 6y ago
A little self-promotion: I've written a blog post to answer the question that this one ends with (how to optimize divisions by constant integers): https://rubenvannieuwpoort.nl/posts/division-by-constant-unsigned-integers.html https://rubenvannieuwpoort.nl/posts/division-by-constant-uns...
https://ridiculousfish.com/blog/posts/labor-of-division-episode-i.html https://ridiculousfish.com/blog/posts/labor-of-division-epis... and https://ridiculousfish.com/blog/posts/labor-of-division-episode-iii.html https://ridiculousfish.com/blog/posts/labor-of-division-epis... also explain this (and are probably better written than my blogpost).
- DoingIsLearning 6y agoOff-topic comment, I really like the clutter-free look of your site, with the latex to html generator. For anyone curious like I was: https://github.com/rubenvannieuwpoort/static-site-generator https://github.com/rubenvannieuwpoort/static-site-generator
- DarkWiiPlayer 6y agoI totally agree! It's easy to read and has a bit of a "paper" feel to it, but at the same time the sans-serif font makes it still feel "modern" and like a website.
- unwind 6y agoVery nice page! Minor nit, there's a typo here in the power-of-two example: uint divide(uint n) { return n << p; } the shifts should be to the right, obviously.
- rustybolt 6y agoThanks! I have a completely rewritten version in the pipeline, where I use easier versions of the theorems/proofs and fix some mistakes (in fact, the proof of lemma 1 is quite nonsensical if you look closely).