Matrix Operation Version SSE
一些常用的 Matrix 4x4 Operation 把它改成 SSE 後,
效能有所提升, 而且 SSE2 的 pshufd 指令優勢,
可以減少一次 movaps 的指令, 當然 SSE 的 shufps 也是有它的用途,
只是在 Matrix 4x4 之下, 這 shufps 似乎沒有它的使用價值.
(單位為 rdtsc 測出值)
MatrixMultiply
MatMul4_x87: 130.00
MatMul4_SSE: 32.00
MatMul4ASSE: 23.67
MatMul4_SSE2: 30.61
MatMul4ASSE2: 22.33
MatMul4_SSE3: 37.00
MatMul41SSE3: 40.25
MatrixInverse
MatInv4_D3D: 111.02
MatInv4_SSE: 90.00
MatInv41SSE: 70.50
MatInv42SSE: 70.63
MatInv4_SSE2: 66.23
MatInv4USSE2: 76.66
MatInv4_SSE4: 61.66
MatrixRotation
MatrixRotationX_x87: 135.00
MatrixRotationX_D3D: 147.04
MatrixRotationX_SSE2: 26.00
效能有所提升, 而且 SSE2 的 pshufd 指令優勢,
可以減少一次 movaps 的指令, 當然 SSE 的 shufps 也是有它的用途,
只是在 Matrix 4x4 之下, 這 shufps 似乎沒有它的使用價值.
(單位為 rdtsc 測出值)
MatrixMultiply
MatMul4_x87: 130.00
MatMul4_SSE: 32.00
MatMul4ASSE: 23.67
MatMul4_SSE2: 30.61
MatMul4ASSE2: 22.33
MatMul4_SSE3: 37.00
MatMul41SSE3: 40.25
MatrixInverse
MatInv4_D3D: 111.02
MatInv4_SSE: 90.00
MatInv41SSE: 70.50
MatInv42SSE: 70.63
MatInv4_SSE2: 66.23
MatInv4USSE2: 76.66
MatInv4_SSE4: 61.66
MatrixRotation
MatrixRotationX_x87: 135.00
MatrixRotationX_D3D: 147.04
MatrixRotationX_SSE2: 26.00
標籤: Assembly
0 Comments:
張貼留言
<< Home