3 ms·
Many platforms have an instruction to get the upper 64-bit word of a widening 64×64-bit multiplication. But it can be difficult to (performantly) access such in
by LegionMammal978 2y ago
Many platforms have an instruction to get the upper 64-bit word of a widening 64×64-bit multiplication. But it can be difficult to (performantly) access such instructions from anything higher-level than assembly, so well-optimized language support for 128-bit integers can open this up.
- stephencanon 2y agoSwift had made this available for a long time via multipliedFullWidth (SE-0104, implemented in Swift 4.0), no Int128 required. E.g.: https://godbolt.org/z/dvMefahdq https://godbolt.org/z/dvMefahdq