Portfolio optimization of random portfolios implemented with Rcpp