문제

If on linux I try to compile c code in the standard way

gcc -myprog.c

the generated binary uses only the base CPU features, since the modern CPUs have a lot of special features to increase the performances, like AVX, AVX2, SSE3, SSE4 etc. according the model

Since I want targeting only a specific CPU type (i7 Sandy Bridge), Is there a way to set the copiler to take advantage of these features?

도움이 되었습니까?

해결책

Look at the -march and -mtune gcc flags

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top