Important: Please read the Qt Code of Conduct -

Vectorization support

  • Does mingw compiler that comes prepacked with qt offline installer support vectorization well?
    What compiler flags should i enable to get maximal speeds on i7-5930k cpu , Haswell E ?
    No other cpu models will run the application.
    Currently using QMAKE_CXXFLAGS_RELASE *= -O3 optimization flag
    Most intense parts of code run under #pragma omp parralel for

  • These flags work under gcc, so they should work under mingw as well.

    -ftree_vectorize (default on -O3)

    However, the compiler can only do so much. When it comes to optimisation, it's paramount to well structured code that can be optimised and can be vectorised. Especially branching in for loops is a major point that creates bottle necks and might disrupt vectorisation. Without having a look at your code it's difficult to give further advice.

  • CONFIG+= -O3 -ffast-math -march=native

    With above open mp for loop function average runtime from 37.8s to 41.2.

    For some reason -O3 -march=native without -ffast-math works better.

    Is there any way to imorove performance further with compiler?
    I don't care if it compiles a week.

Log in to reply