3 ms·
GMP is arbitrary precision. __int128 on a 64 bit processor is optimized for one size.
by tacos 11y ago
GMP is arbitrary precision. __int128 on a 64 bit processor is optimized for one size.
- jmgao 11y agoIt's actually even better than that. They're only using __int128 to hold the result of a 64 by 64 bit multiplication, and x86_64's mul instruction will give you this for free. gcc is smart enough to generate code that is literally just a single mul.