Efficiency of matrix rowSums() vs. colSums() in R vs Rcpp vs Armadillo
问题 Background Coming from R programming, I'm in the process of expanding to compiled code in the form of C/C++ with Rcpp . As a hands on exercise on the effect of loop interchange (and just C/C++ in general), I implemented equivalents to R's rowSums() and colSums() functions for matrices with Rcpp (I know these exist as Rcpp sugar and in Armadillo -- this was just an exercise). Question I have my C++ implementation of rowSums() and colSums() along with Rcpp sugar and arma::sum() versions in this