News for hackers. Stuff that matters.
Re:Avoiding instruction cache misses (2019) by lldbg on Friday January 08, 2021 @07:13AM (#25683848)
Could you expand on the 24x24 unrolling with AVX? How big of a benefit did you obtain, compared to say using a library such as Armadillo, Fastor, Eigen, etc?
Re:Avoiding instruction cache misses (2019) by Const-me on Friday January 08, 2021 @07:58AM (#25684192)
Eigen was my baseline. As far as I remember, my best AVX version (which unrolls 24x4 blocks, running 6 iterations of the loop) was about 50% faster.

Eigen is designed in the assumption these vectors/matrices are large. 24 is not large, fits in 3 vector registers out of the 16 available. Eliminating data access latency of the accumulators is what caused the speedup.

Re:Avoiding instruction cache misses (2019) by lldbg on Friday January 08, 2021 @10:08AM (#25685389)
In my experience Eigen is not very good either for small matrices, whilst Fastor performs much better.

Interesting

Re:Avoiding instruction cache misses (2019) by Const-me on Saturday January 09, 2021 @06:42PM (#25706383)
Libraries don’t cut it, IMO. Sometimes you want your complete input data in registers, 4x4 matrices fit there nicely. Other times you want to stream stuff from memory, the above-mentioned 24x24 multiplication streams the complete matrix, while loading 4-long chunks of the vector.

I’ve wrote an introduction article some time ago: http://const.me/articles/simd/simd.pdf

Here’s more practical one: https://stackoverflow.blog/2020/07/08/improving-performance-...