News for hackers. Stuff that matters.
Re:Building Your Own Efficient uint128 in C++ by azhenley on Sunday February 01, 2026 @09:07PM (#46851595)
> we use 256-bit integers in our hot paths and go up to 564 bits for certain edge cases.

Why 564 bits? That’s 70.5 bytes.

Re:Building Your Own Efficient uint128 in C++ by wavemode on Sunday February 01, 2026 @10:56PM (#46852232)
Maybe it's a typo for 512. I'm not even sure how you would achieve 564 in this context.
Re:Building Your Own Efficient uint128 in C++ by PhilipTrettner on Friday February 06, 2026 @08:39AM (#46912695)
It's actually not a typo. Our "real" internal code starts with integer bounds on the inputs (say 2^26) and then computes for each subexpression how many bits are actually needed to exactly represent that. That can even lead to fractional bits (like in "a + b + c"). The generated code then rounds up to the next 64 bit multiple.
Re:Building Your Own Efficient uint128 in C++ by its_ubuntu on Sunday February 01, 2026 @10:44PM (#46852170)
It was a nice, round number.
Re:Building Your Own Efficient uint128 in C++ by pavon on Monday February 02, 2026 @08:56AM (#46856082)
I wonder if it was 5*64 bits that got mangled in editing. If 256 bits is sufficient for most of their code, I could see there being corner cases that need a few more bits but moving to 512 bits would be overkill.