on 64 bit aarch64, int64 is faster than int128_struct.
Yes, but my benchmark also showed int64 is faster than int128, as this was on a system supporting __int128
. So if there are systems where we want to prefer widemul=int64 over widemul=int128, that’s a discussion independent from the int128_struct decision logic.
To find an example where this branch here (use int128_struct over int64, because int128 isn’t available) matters, we’ll need to go outside of gcc/clang/icc/MSVC, because on those we all have access to true 64x64->128 hardware multiplication if it exists. I don’t know if there are any vaguely popular C compilers for 64-bit platforms out there… does Borland still exist?
EDIT: GCC 4.5 and below, or clang 3.0 and below, for x86_64, would be relevant platforms…