[Development] Using SSE/NEON in Qt 6

Lars Knoll lars.knoll at qt.io
Thu Feb 6 15:03:58 CET 2020


> On 6 Feb 2020, at 14:54, Kevin Kofler <kevin.kofler at chello.at> wrote:
> 
> Lars Knoll wrote:
>> As a side note: SSE 4.1 offers some nice additional instructions that
>> would simplify some of the operations. Should we keep the minimum
>> requirement for SSE at version 2, or can we raise it to 4.1?
> 
> SSE2, definitely. There is lots of hardware still in use that does not 
> support SSE4.1, nor even SSE3 and/or SSSE3, and many GNU/Linux distributions 
> are still targeting such SSE2-only hardware. (In fact, some do not even 
> officially require SSE2 on 32-bit x86, but are unable to fully support older 
> hardware due to requirements of various upstream software.) By requiring 
> SSE4.1, you would drop support for 3 entire generations of hardware (SSE2, 
> SSE3, SSSE3).
> 
> Can we not have the best of both worlds by detecting SSE4.1 availability at 
> runtime? AFAIU, that is already done in some places in Qt.

Of course. We already do that and that works fine for some use cases. 

But when we want to have optimised versions of small inline methods like multiplication of a matrix with a vector or the dot product of two vectors, a runtime check would be too much overhead.

Cheers,
Lars



More information about the Development mailing list