Clever extension of “magic number” division... I've known about the use of multiplication by a “magic number” as a substitute for division by an integer constant, to improve performance. I've always thought of the technique as being limited in range, for reasons that are obvious if you understand how it works. Here's
a simple technique to remove those limitations...
No comments:
Post a Comment