The ubiquitous LAPACK library provides several implementations for the singular-value decomposition (SVD). We will illustrate possible speed gains from using the divide-and-conquer method by comparing it to the base case. #include <RcppArmadillo.h> // ] // ] arma::vec baseSVD(const arma::mat & X) { arma::mat U, V; arma::vec S; arma::svd(U, S, V, X, "standard"); ...