3 ms·
Modern processors speed up large copies with SIMD instructions like AVX. The Linux kernel chooses not to use SIMD because the cost of copying & saving the rele
by twoodfin 6y ago
Modern processors speed up large copies with SIMD instructions like AVX.
The Linux kernel chooses not to use SIMD because the cost of copying & saving the relevant processor state (registers, in this case) would be borne by every syscall and consume precious CPU cache.
This would be true for any similar copying mechanism that spanned multiple cycles; the state—however represented—must be preserved.
- dan-robertson 6y agoThat’s a statement about modern implementations of memcpy, whereas I was asking about what processors themselves do when they see a non-vector memcpy loop.