2007
DOI: 10.1093/comjnl/bxm082
|View full text |Cite
|
Sign up to set email alerts
|

Efficient Algorithms for Integer Division by Constants Using Multiplication

Abstract: We present a complete analysis of the integer division of a single unsigned dividend word by a single unsigned divisor word based on double-word multiplication of the dividend by an inverse of the divisor. The well-known advantage of this method yields run-time efficiency, if the inverse of the divisor can be calculated at compile time, since multiplication is much faster than division in arithmetic units. Our analysis leads to the discovery of a limit to the straightforward application of this method in the f… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
22
0

Year Published

2019
2019
2024
2024

Publication Types

Select...
5
1

Relationship

0
6

Authors

Journals

citations
Cited by 9 publications
(22 citation statements)
references
References 5 publications
0
22
0
Order By: Relevance
“…For α = 1, Theorems 3.2 and 3.4 set α ′ to 2 k • δ −1 and 2 k • δ −1 , respectively. The former is the choice taken by [1,5,10] and the latter by [16]. Finally, [22] and an appendix to [5], consider both and, in this particular case, rigourously justify the heuristics we have suggested for choosing between the two approaches.…”
Section: Proofmentioning
confidence: 98%
See 2 more Smart Citations
“…For α = 1, Theorems 3.2 and 3.4 set α ′ to 2 k • δ −1 and 2 k • δ −1 , respectively. The former is the choice taken by [1,5,10] and the latter by [16]. Finally, [22] and an appendix to [5], consider both and, in this particular case, rigourously justify the heuristics we have suggested for choosing between the two approaches.…”
Section: Proofmentioning
confidence: 98%
“…This section covers optimisations for (α • r + β)/δ. The particular case α = 1 and β = 0 has been considered by many authors [1,5,10,16,22], who have derived strength reductions whereby r/δ is reduced to a multiplication and cheaper operations. Major compilers implement the algorithms of [10].…”
Section: Fast Evaluation Of Euclidean Affine Functionsmentioning
confidence: 99%
See 1 more Smart Citation
“…Their approach was later refined by Robison [7]. Similarly, Granlund and Montgomery's approach [5] (without an intermediate addition) was refined by Cavagnino and Werbrouck [13], and later by Warren [11]. As remarked by Robison [7], the two approaches (with and without an intermediate addition) are complementary: we can choose one or the other depending on the divisor.…”
Section: Other Related Workmentioning
confidence: 99%
“…Given any nonzero 32‐bit divisor known at compile time, the optimizing compiler can (and usually will) replace the division by a multiplication followed by a shift. Following the work of Cavagnino and Werbrouck, Warren finds that Granlund and Montgomery choose a slightly suboptimal number of fractional bits for some divisors. Warren's slightly better approach is found in LLVM's Clang compiler (see Algorithm 1).…”
Section: Related Workmentioning
confidence: 99%