4 ms·
> 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.
by azhenley 9mo ago
> 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.
- its_ubuntu 9mo ago[dead]
- wavemode 9mo agoMaybe it's a typo for 512. I'm not even sure how you would achieve 564 in this context.
- PhilipTrettner 9mo agoIt'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.
- pavon 9mo agoI 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.