First look at SIMD in .Net
10/19/2017
Recently I have been reading about Performance of .Net application, I ran into the following post explaining processor and cache affects on our code.
Processor pipelining shifted my interests to Single Instruction Multiple Data. SIMD has been added to the .Net ecosystem with the RyuJIT, as the following blog post details it.
There are a couple of mathematical and graphical use-cases described where this technology is applicable, but I still see a great opportunity ahead, where mass amount of real-time numerical data needs to be processed (and we are not willing to use GPU for instance). By curiosity I have created a couple of examples and compared the performance of these use-cases to regular code.
Note that the following examples use Vector<T>
which is available through a NuGet package at the time. Only regular Vector2/3/4f are available in the full framework.