Journal
HELIYON
Volume 7, Issue 6, Pages -Publisher
ELSEVIER SCI LTD
DOI: 10.1016/j.heliyon.2021.e07442
Keywords
Integer division; Compiler optimization; Tight bounds
Categories
Funding
- Natural Sciences and Engineering Research Council of Canada [RGPIN20170391]
Ask authors/readers for more resources
The paragraph discusses techniques for optimizing software by replacing integer division with more convenient calculations, such as transforming n divided by d into c*n (or c*n + c) divided by m, where c and m are chosen to approximate the reciprocal c/m to 1/d.
The integer division of a numerator n by a divisor d gives a quotient q and a remainder r. Optimizing compilers accelerate software by replacing the division of n by d with the division of c * n (or c * n + c) by m for convenient integers c and m chosen so that they approximate the reciprocal: c/m approximate to 1/d. Such techniques are especially advantageous when m is chosen to be a power of two and when d is a constant so that c and m can be precomputed. The literature contains many bounds on the distance between c/m and the divisor d. Some of these bounds are optimally tight, while others are not. We present optimally tight bounds for quotient and remainder computations.
Authors
I am an author on this paper
Click your name to claim this paper and add it to your profile.
Reviews
Recommended
No Data Available