Hi Carlos,
As a data-parallel library, ArrayFire aims to perform well on larger data sizes. In this code, the matrices are 7x3, which is very small.
Also, you are using the ArrayFire CPU backend. The CPU backend is not optimized and is available primarily for compatibility purposes. The GPU backends are where we have spent our time optimizing the library.
To improve ArrayFire's relative performance, try much larger data sizes (e.g., 1024x1024) and compare the performance on a GPU versus Armadillo on the CPU.
Good luck,
John