Why is valarray so slow on Visual Studio 2015?
问题 To speed up the calculations in my library, I decided to use the std::valarray class. The documentation says: std::valarray and helper classes are defined to be free of certain forms of aliasing, thus allowing operations on these classes to be optimized similar to the effect of the keyword restrict in the C programming language. In addition, functions and operators that take valarray arguments are allowed to return proxy objects to make it possible for the compiler to optimize an expression