Monday, May 12, 2014

Geek: computers really suck at division...

Geek: computers really suck at division...  By that, I mean that division is slow compared with other arithmetic operations, and there are no simple ways to make it faster.  So programmers will sometimes go to extreme lengths to avoid it...

I've never done anything quite like what the article describes.  However, I have used many other “tricks”, including table look-ups, shift-and-add (for fixed integers), and approximations.  The programmers working on video games have been particularly inventive in this area, as their code often needs to do many millions of divisions in order to paint a scene...

No comments:

Post a Comment