, ( ) " ", input[] - . - , . OTOH, , .
__restrict__, , ? , , .
restrict - C99, ISO ++, ++ __restrict__ __restrict . CPP #define __restrict__ __restrict MSVC , - .
gcc /, clang .
gcc, / (. bugzilla, , , , gcc4.0 - ). ( /), .
__restrict__, clang / xmm ymm. vpextrd ! . + asm Godbolt, clang++ 3.8 -O3 -march=haswell.
g++ 6.1 , . ( gcc godbolt). memcpy, SIMD, -march=haswell, .:/
- , reorder() , . / SIMD, - uop - L1. / L2. , 8- , . ( + ModRM + disp32). , , gcc 32- mov (1 ) movss (3 )
, , , , , , - 32kiB L1 - ( mov ). perf counters, I-cache. . x86 wiki, x86, Agner Fog.
, calloc - , . , ( ). , , calloc - , , - / TLB. , , , , , .
memcpy memset . , , , - perl ( ), memset.
(, 128 ), asm rep movsd ( rep movsq) , Intel. gcc memcpy rep movs memcpy, , (SIMD vs. rep movs) -mstringop-strategy. , , , , .
, , , - , rep movs , . ( Intel, , IvB fast rep movsb ( P6).)
clang gcc, , asm . ( ), asm, rsi, rdi ecx rep movsd.
, . , -. OTOH, - , , . , .
intrinsics, , NT , ( 64B, 64B), . , , , NT?
NT , IDK, NT - . , , (. ).
, . , , . , , , . , - , , .