快速无符号常数除法的经典向上取整变体:算法与完整证明
Classic Round-Up Variant of Fast Unsigned Division by Constants: Algorithm and Full Proof
AI总结:
针对常数整数除法开销问题,本文研究快速无符号常数除法的经典向上取整变体,给出完整正确性与可行性证明,并提出面向有界被除数的简化变体。
摘要:
在大多数体系结构中,整数除法指令通常开销较大。若除数为常数,则除法可转换为若干低成本整数指令的组合。本文讨论快速无符号常数除法算法的经典向上取整变体,并给出其正确性与可行性的完整证明。此外,还提出了一种适用于有界被除数的更简单变体。
英文摘要:
Integer division instruction is generally expensive in most architectures. If the divisor is constant, the division can be transformed into combinations of several inexpensive integer instructions. This article discusses the classic round-up variant of the fast unsigned division by constants algorithm, and provides full proof of its correctness and feasibility. Additionally, a simpler variant for bounded dividends is presented.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。