performance of coefficient-wise array operations of the eigen library with mkl backend
问题 I am porting a Matlab algorithm with lots of coefficient-wise array operations to C++, which look like this example, but are often much more complex: Eigen::Array<double, Dynamic, 1> tx2(12); tx2 << 1,2,3,4,5,6; Eigen::Array<double, Dynamic, 1> tx1(12); tx1 << 7,8,9,10,11,12; Eigen::Array<double, Dynamic, 1> x = (tx1 + tx2) / 2; The C++ code turned out to be significantly slower than Matlab (around 20%). So in a next step I tried to turn on the Intel MKL implementation of Eigen, which did