[Rcpp-devel] Eigen vs Arma -- was: Re: Ceres nonlinear least squares solver

Whit Armstrong armstrong.whit at gmail.com
Thu May 3 14:20:32 CEST 2012


Apologies for my question, it's a little off topic from your original
post (hence the modified subject).

I've integrated Armadillo into the new mcmc packages I've been
developing without giving much thought to Eigen.

Unfortunately, the benchmarks page on the Armadillo site doesn't
provide an Eigen benchmark: http://arma.sourceforge.net/speed.html

Likewise, for the Eigen benchmark page:

In your experience, do you find it to be faster than Armadillo?  Have
you done any benchmarking? If so, can you share the results (or the


On Wed, May 2, 2012 at 12:33 PM, Douglas Bates <bates at stat.wisc.edu> wrote:
> Dirk forwarded a posting on Google's blog about the Ceres nonlinear
> least squares solver in C++ to his Google+ followers and asked if
> anyone was interested in using Rcpp to link to this C++ code.   As a
> person with some experience in nonlinear least squares and also having
> experience with Eigen (http://eigen.tuxfamily.org) which is used by
> Ceres, I decided to take a look.
> There are many nice features of Ceres including great flexibility and
> both numeric and automatic differentiation.  However, like many
> optimization codes it does not allow reverse communications, which
> would make for much easier integration with languages like R.
> Features like automatic differentiation require that the function for
> evaluating residuals be written in pure C++ (i.e. evaluation of an R
> expression would not be allowed) so that operators and functions can
> be overloaded.   A person has already asked about this on the
> ceres-solver Google group - in his case he was interested in defining
> the residual function in python.
> So it may be worthwhile doing the linkage but the real advantages of
> the code will probably be lost. As a first cut it would probably be
> best to use only the dense solvers, which are based on Eigen, and not
> the sparse solvers based on SuiteSparse as used in the Matrix package.
>  Eigen is a template library implemented as header files.  Suitesparse
> is C code with a peculiar, idiosyncratic template mechanism based on
> Makefiles and accessing the compiled code is not fun.
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

More information about the Rcpp-devel mailing list