libweston: Optimise matrix multiplication
The previous version used div() to separate the column and row of the
current element, but that function is implemented as a libc call, which
prevented the compiler from vectorising the loop and made matrix
multiplication appear quite high in profiles.
With div() removed, we are down from 64 calls to vfmadd132ss acting on
one float at a time, to just 8 calls to vfmadd132ps when compiled with
AVX2 support (or 16 mulps, 16 addps with SSE2 support only), and the
function isn’t a hot spot any more.
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parent
102acac6
Loading
Loading
Pipeline
#781816
passed
with stages
in
1 minute and 59 seconds
Loading
Please register or sign in to comment