3 ms·
...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.go
by 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.