Hi. I recently decided to start learning SIMD, and after a couple of hours of looking at manuals without any prior experience I have managed to vectorize a simple function. It was fun and I would like to continue learning, but I think it would be more fruitful if I would do it in a more structured way.
I have tried searching online for some materials, but so far I have only found either manuals, cheat sheets, or random blogs with solitary examples. So I would like to ask you, do you know any good books/materials/tutorials/courses/exercises/web series/talks/etc. that could help me with my learning?
More specifically I am looking for something that would:
cover mostly x86_64
explain how it exactly works from the perspective of a CPU; what registers are involved, how instruction "latency" looks like compared to "normal" scalar operations, how to read generated assembly, etc.
explain history of SIMD extentions, and what each of them introduced
preferably be in a written form
would include many exercises; I would like to try to come up on my own with solutions to specific algorithms, and then to compare them to already existing implementations. Generally I learn best by doing.
I want to write it in Rust, but since Intel's intrinsics names are the same, the learning materials can by in C/C++; I don't think it should make a difference
if it is of really high quality I am willing to pay for such materials
give me general knowledge and teach techniques of approaching different problems (I know that I can only master it by continuously using it; I just want to give myself a proper base from which I can start)
If you could recommend me something like this, I would be very obliged.
The author of this talk has an online book at Algorithms for Modern Hardware - Algorithmica which covers both CPU architecture, which is very useful to understand for getting the best performance out of SIMD code, as well as a chapter (10) that covers SIMD specifically.
The ffmpeg project somewhat recently released an assembler course. I haven't had time to look at it, but when they announced it they made it clear that the primary objective was to teach people SIMD (specifically because they need more people to help out with ffmpeg). So with the caveat that I haven't actually looked it myself, you might be interested in FFmpeg School of Assembly Language.