@karlnapf its about the matrix multiplication. Sergey said something about using noalias in matrix multiplication in the log_det method, which I needed to check. Thought I'd check and add later :)