-----Ursprüngliche Nachricht-----
Von: Hans Åberg via Std-Proposals <std-proposals@lists.isocpp.org>
Gesendet: Mi 14.01.2026 11:04
Betreff: Re: [std-proposals] Modular integers
An: Jan Schultke <janschultke@googlemail.com>;
CC: Hans Åberg <haberg_1@icloud.com>; std-proposals@lists.isocpp.org;

> If you have an optimization opportunity that LLVM does not take, why don't you make an LLVM PR or bug report instead of a C++ proposal?

The optimizations are not a part of a C++ proposal, clearly, since the standard does not make such statements. There is usually a requirement of at least one fairly efficient implementation, leaving it open for improvements, and that is what I indicated.

The LLVM code is in C, so templates won't help there. They seem happy with what they have.

 

That is "their problem", they can create a C++ interpreter inside the compiler, if needed to create the resulting efficient code.

Or hardcode the problem for any bit width from 1 to 4096 bits.

Typically this functionality could be done in C with recursive function calls?