Date: Wed, 14 Jan 2026 18:13:20 +0100
On 14/01/2026 18:00, Hans Ã…berg via Std-Proposals wrote:
>
>> On 14 Jan 2026, at 16:34, Thiago Macieira via Std-Proposals <std-
>> proposals_at_[hidden]> wrote:
>>
>> What Hans has to show and has so far failed to do is that it would
>> be *impossible* for LLVM to match the performance of his code,
>> providing a reason why that would be the case.
>
> It looks difficult to do in C in the absence of templates, unlike C+
> + then, because the code should be expanded statically for
> pipelining, even though there are suggestions in this thread that it
> might be possible.
>
You are going around in circles here.
First, neither GCC nor clang (nor, I believe, MSVC) are implemented in C
- they are implemented in C++.
Secondly, the language used in the compiler is utterly irrelevant to the
code it generates. And that generated code is in assembly, not C, C++,
or any other HLL.
Thirdly, the language used is pretty much irrelevant to the algorithms
used to generate the code. You personally might have found it
convenient to work with recursive C++ templates - that does not hinder
anyone from using recursive C functions to generate the same results.
You have written some 30 or 40 posts while failing to answer the
critical questions here. Until you do, this discussion is going nowhere.
1. Is there any fundamental reason why a compiler implementation of
_BitInt cannot generate at least as fast code as you can do with your
templates? We don't care (at this stage) about what current compilers
actually /do/, or how much effort it would be to make them generate as
good code as you have.
2. Assuming compilers can implement _BitInt operations as efficiently as
you like, is there any other reason to have large modular integers in
the C++ library?
>
>> On 14 Jan 2026, at 16:34, Thiago Macieira via Std-Proposals <std-
>> proposals_at_[hidden]> wrote:
>>
>> What Hans has to show and has so far failed to do is that it would
>> be *impossible* for LLVM to match the performance of his code,
>> providing a reason why that would be the case.
>
> It looks difficult to do in C in the absence of templates, unlike C+
> + then, because the code should be expanded statically for
> pipelining, even though there are suggestions in this thread that it
> might be possible.
>
You are going around in circles here.
First, neither GCC nor clang (nor, I believe, MSVC) are implemented in C
- they are implemented in C++.
Secondly, the language used in the compiler is utterly irrelevant to the
code it generates. And that generated code is in assembly, not C, C++,
or any other HLL.
Thirdly, the language used is pretty much irrelevant to the algorithms
used to generate the code. You personally might have found it
convenient to work with recursive C++ templates - that does not hinder
anyone from using recursive C functions to generate the same results.
You have written some 30 or 40 posts while failing to answer the
critical questions here. Until you do, this discussion is going nowhere.
1. Is there any fundamental reason why a compiler implementation of
_BitInt cannot generate at least as fast code as you can do with your
templates? We don't care (at this stage) about what current compilers
actually /do/, or how much effort it would be to make them generate as
good code as you have.
2. Assuming compilers can implement _BitInt operations as efficiently as
you like, is there any other reason to have large modular integers in
the C++ library?
Received on 2026-01-14 17:13:29
