C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Modular integers

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 13 Jan 2026 13:22:53 -0800
On Tuesday, 13 January 2026 13:13:52 Pacific Standard Time Hans Ã…berg via Std-
Proposals wrote:
> LLVM is written in C, and for 128 bits, it already has the standard 2-by-1
> 64-bit word algorithm, though 2-by-2 is binary division. If one wants to
> have the former for 256 bits, the code must somehow be iterated. Using the
> standard multiprecision division algorithm would introduce a loop, breaking
> the pipelining.

Why *must* it use a loop?

I don't see one here https://clang.godbolt.org/z/5KcPbT559.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel Data Center - Platform & Sys. Eng.

Received on 2026-01-13 21:23:03