I've heard that the 128-bit integer data-types like __int128_t
provided by GCC are emulated and therefore slow. However, I understand that the various SSE instruction sets (SSE, SSE2, ..., AVX) introduced at least some instructions for 128-bit registers. I don't know very much about SSE or assembly / machine code, so I was wondering if someone could explain to me whether arithmetic with __int128_t
is emulated or not using modern versions of GCC.
The reason I'm asking this is because I'm wondering if it makes sense to expect big differences in __int128_t
performance between different versions of GCC, depending on what SSE instructions are taken advantage of.
So, what parts of __int128_t
arithmetic are emulated by GCC, and what parts are implemented with SSE instructions (if any)?