4 ms·
well in a way all processors commonly use them... as big-endian is also the network byte order
by unilynx 2y ago
well in a way all processors commonly use them... as big-endian is also the network byte order
- flohofwoe 2y ago...x86 CPUs actually have special mov instructions now to load big endian data. Not sure since when though (on godbolt it needs `-march=native`: https://www.godbolt.org/z/bWfhGx7xh https://www.godbolt.org/z/bWfhGx7xh ...without -march=native it's a mov and bswap (so not too bad either).
- cmovq 2y agoLooks like it was introduced with Haswell (2013). So it’s safe to use if you’re also compiling with AVX2.