Date: Thu, 15 Jan 2026 09:53:07 +0100
> On 14 Jan 2026, at 22:59, Thiago Macieira via Std-Proposals <std-proposals_at_[hidden]> wrote:
>
> On Wednesday, 14 January 2026 10:24:05 Pacific Standard Time Hans Åberg via
> Std-Proposals wrote:
>> They discussed alignment here before. Also, padding to the nearest 2^(2^k)
>> would be needed for the recursive templates.
>
> All _BitInt of a power of 2 have exactly that size, with no padding bits.
> Therefore, _BitInt(256) or _BitInt(65536) *can* be as efficient as your code.
>
> _BitInt(4096) has exactly 4096 bits. Are you claiming that to get the best
> performance, it should be padded up to 65536 bits, the next power of 2 raised
> to a power of 2 (k = 4)?
The number 2^(2^k) is the modulus; the number of bits is 2^k.
>
> On Wednesday, 14 January 2026 10:24:05 Pacific Standard Time Hans Åberg via
> Std-Proposals wrote:
>> They discussed alignment here before. Also, padding to the nearest 2^(2^k)
>> would be needed for the recursive templates.
>
> All _BitInt of a power of 2 have exactly that size, with no padding bits.
> Therefore, _BitInt(256) or _BitInt(65536) *can* be as efficient as your code.
>
> _BitInt(4096) has exactly 4096 bits. Are you claiming that to get the best
> performance, it should be padded up to 65536 bits, the next power of 2 raised
> to a power of 2 (k = 4)?
The number 2^(2^k) is the modulus; the number of bits is 2^k.
Received on 2026-01-15 08:53:25
