Using a for loop is 10x faster than multipliying a sliced matrix with Eigen
See the example here https://godbolt.org/z/7nWzr3ors There are three examples. The first one is my initial implementation, and the following two examples are solutions I found that are much faster, which I did not expect.
My first question is about a line that is commented out because it attempts to use noalias(), but it does not compile. Is this a bug, or something not supported yet?
My second question is, why is there such a significant difference in terms of performance? Is this due to a lack of optimization with slicing operations?
Thank you in advance for your answers. Florian
Edited by Florian Maurin