Date: Tue, 13 Jan 2026 18:06:26 +0100
> On 13 Jan 2026, at 16:44, Jeremy Rifkin via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
>> It is too slow.
>
> What compiler? LLVM's codegen for extended integers is pretty good.
> Extended power of two integers are relatively trivial. I wouldn't
> expect some specific modular integer type to be able to do any better.
My 2-word by 1-word division implementation is twice as fast as that of LLVM, and most speedup was achieved by avoiding backward jumps for pipelining, some additional by using only one multiplication per half-word. Both these techniques are not possible to do in higher multiprecision division.
(The LLVM 2-word by 2-word division 64-bit implementation uses binary division, which is more than 6 times slower than a full word implementation.)
>
>> It is too slow.
>
> What compiler? LLVM's codegen for extended integers is pretty good.
> Extended power of two integers are relatively trivial. I wouldn't
> expect some specific modular integer type to be able to do any better.
My 2-word by 1-word division implementation is twice as fast as that of LLVM, and most speedup was achieved by avoiding backward jumps for pipelining, some additional by using only one multiplication per half-word. Both these techniques are not possible to do in higher multiprecision division.
(The LLVM 2-word by 2-word division 64-bit implementation uses binary division, which is more than 6 times slower than a full word implementation.)
Received on 2026-01-13 17:06:43
