# Faster remainder by direct computation: Applications to compilers and software libraries

```@article{Lemire2019FasterRB,
title={Faster remainder by direct computation: Applications to compilers and software libraries},
author={Daniel Lemire and Owen Kaser and Nathan Kurz},
journal={Software: Practice and Experience},
year={2019},
volume={49},
pages={953 - 970}
}```
• Published 2019
• Mathematics, Computer Science
• Software: Practice and Experience
On common processors, integer multiplication is many times faster than integer division. Dividing a numerator n by a divisor d is mathematically equivalent to multiplication by the inverse of the divisor (n/d=n∗1/d). If the divisor is known in advance, or if repeated integer divisions will be performed with the same divisor, it can be beneficial to substitute a less costly multiplication for an expensive division. Currently, the remainder of the division by a constant is computed from the… Expand
A 32-bit Integer Division Algorithm Based on Priority Encoder
• Computer Science
• 2020 27th IEEE International Conference on Electronics, Circuits and Systems (ICECS)
• 2020
An algorithm for 32-bit integer division of positive and negative dividends and divisors represented in sign and magnitude is proposed and its functionality was verified by ModelSim simulations. Expand
Padding in the mathematics of arrays
Multi-dimensional array manipulation constitutes a core component of numerous numerical methods, e.g. finite difference solvers of Partial Differential Equations (PDEs). The efficiency of suchExpand
Euclidean Affine Functions and Applications to Calendar Algorithms
• Computer Science
• ArXiv
• 2021
The main application presented in this article relates to Gregorian calendar algorithms and it is shown how they can be implemented substantially more efficiently than is currently the case in widely used C, C++, C# and Java open source libraries. Expand
A Constant Time Full Hardware Implementation of Streamlined NTRU Prime
This work implements the entire KEM algorithm, including all steps for key generation, encapsulation and decapsulation, and all enand decoding, in a constant time hardware implementation of the NIST round 2 post-quantum cryptographic algorithm Streamlined NTRU Prime. Expand
MUSE: Multi-Use Error Correcting Codes
• Computer Science
• ArXiv
• 2021
In this work we present a new set of error correcting codes – Multi-Use Error Correcting Codes (MUSE ECC) – that have the ability to match reliability guarantees of all commodity, conventionalExpand
Integer division by constants: optimal bounds
• Medicine, Computer Science
• Heliyon
• 2021
This work presents optimally tight bounds for quotient and remainder computations for convenient integers c and m chosen so that they approximate the reciprocal: c/m≈1/d. Expand
Number parsing at a gigabyte per second
• D. Lemire
• Computer Science
• Softw. Pract. Exp.
• 2021
By combining the significand and precomputed tables, the solution to the problem of parsing decimal numbers to the nearest binary floating‐point value can be several times faster than conventional functions present in standard C libraries on modern 64‐bit systems. Expand
c-Trie++: A Dynamic Trie Tailored for Fast Prefix Searches
This work proposes a keyword dictionary that represents K in n lg σ + Θ (k lg n) bits of space, supporting all operations in Θ(m / α + lg α) expected time on an input string of length m in the word RAM model. Expand