I’ve studied LinuxToolchain.cs and found out that neither march flag nor msse, mavx flags are used, which means clang uses default settings (SSE2 at my computer). That’s a shame, because I have a Broadwell processor which supports MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, AVX, AVX2, AES, PCLMUL, FSGSBASE, RDRND, FMA, BMI, BMI2, F16C, RDSEED, ADCX and PREFETCHW instruction sets (wow, that was a long list). So I added “-march=native” to LinuxToolchain.cs and rebuilt UE. Note, that triple loading speedup when using AVX was reported.
I’ve seen a proposal to use AVX by default which was declined.
I propose something different: to allow to set march flag for compiling UE itself and UE projects, so that users would benefit better performance. The default option will be the same as now, so no compatibility will be broken.
This might be an option in BuildConfiguration.xml
So, I’ve made a small pull request for this. Feel free to comment.