Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AVX

Detect AVX

objdump -d ./a.out | grep -i "xmm|ymm|zmm"

Compile with AVX

g++ -mavx2 -o a.out a.cpp

Compile without AVX

g++ -mno-avx -mno-avx2 -o a.out a.cpp

Trace AVX usage

perf stat -e r0728 -e r1828 -e r2028 -e r4028 -a -l 1000