How It Works: SQL Server 2016 SSE/AVX Support


Moved from: bobsql.com

 

My recent posts

https://blogs.msdn.microsoft.com/bobsql/2016/06/03/sql-2016-it-just-runs-faster-column-store-uses-vector-instructions-sseavx/ https://blogs.msdn.microsoft.com/bobsql/2016/06/03/sql-2016-it-just-runs-faster-bulk-insert-uses-vector-instructions-sseavx/

have generated discussions about the SSE and AVX support boundaries.

 

As indicated, SQL Server 2016 added the use of SSE and AVX instructions in various code paths to improve performance.  The inquiries have centered around the support boundaries of the SSE and AVX instructions.   This post will outline SQL Server’s decisions around SSE/AVX or software algorithm use.

 

SSE/AVX

SQL Server asks the CPU if it supports SSE or AVX in order to determine the level of hardware support present on the system.  The SOS layer added helper functions which