Date: Wed, 14 Jan 2026 18:31:06 +0100
> On 14 Jan 2026, at 18:19, Alejandro Colomar <une+cxx_std-proposals_at_[hidden]> wrote:
>
> Hi Hans,
Hi,
> On Wed, Jan 14, 2026 at 06:00:37PM +0100, 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.
>
> LLVM should be able to implement _BinInt() as a template if it would
> make it more efficient. That's an implementation detail. The fact that
> it's *currently* written in C doesn't prevent them from rewriting it in
> C++, or in assembly.
Indeed, it is a C compatibility type, intended to work exactly in C, which imposes some limitations. Discussions in the past focused on making a separate C++ type for bit interesting, which I think would be good.
>
> Hi Hans,
Hi,
> On Wed, Jan 14, 2026 at 06:00:37PM +0100, 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.
>
> LLVM should be able to implement _BinInt() as a template if it would
> make it more efficient. That's an implementation detail. The fact that
> it's *currently* written in C doesn't prevent them from rewriting it in
> C++, or in assembly.
Indeed, it is a C compatibility type, intended to work exactly in C, which imposes some limitations. Discussions in the past focused on making a separate C++ type for bit interesting, which I think would be good.
Received on 2026-01-14 17:31:23
