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

Douglas Bates bates at stat.wisc.edu
Sat May 5 18:28:17 CEST 2012


On Thu, May 3, 2012 at 11:31 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 3 May 2012 at 10:33, Whit Armstrong wrote:
> | Thanks for that.  So, roughly 2x vs arma for lm fit.
>
> I do not think you will get '2x'.  I'd say between 1/5 to 1/3.

> Not neglible, but not earth-shattering given that

>  a) Armadillo is easier to work with (IMHO, and personal taste) and

To me it is more than a speed difference.  Decompositions, Views, etc.
in Eigen are methods for the basic matrix classes, which I find much
more attractive than free-standing functions, as in Armadillo.  To me
the design of Eigen is comprehensive and consistent.

>  b) you'd loose OS X as a platform on CRAN (as per Alfons example and why he
>     added sparseLTSEigen as a plugin for robustHD) and (AFAICT) why Doug
>     can't move forward with the Eigen-based lme4 rewrite.

We will release the Eigen-based lme4 rewrite and if there is no binary
package for OS X I plan on pointing at Simon and Brian regarding the
Mac OS X binary package creation.  You can build the package for i386
OS X even with the old, buggy version of gcc shipped with XCode.  The
compiler error reported for the binary package of RcppEigen comes from
trying to cross-compile C++ code on a i386 Mac for ppc Macs.  There
are many options for avoiding the problem but I haven't been able to
interest those involved in creating OS X packages to look at it.

At present Ben compiles OS X packages and makes them available in a
repository on lme4.R-forge.R-project.org

> | It would not be hard to test it on my logp functions in cppbugs...
> |
> | Perhaps after R/Fin. I'll post back once I get around to it.  Thanks again.
> |
> | Cheers,
> | Whit
> |
> |
> | On Thu, May 3, 2012 at 8:43 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> | >
> | > On 3 May 2012 at 08:20, Whit Armstrong wrote:
> | > | Doug,
> | > |
> | > | 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:
> | > | http://eigen.tuxfamily.org/index.php?title=Benchmark
> | > |
> | > | 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
> | > | code)?
> | >
> | > I have two data points for you:
> | >
> | >  a) Section 4.7 of the RcppEigen vignette has a fairly extensive timing
> | >    comparison which includes a table:
> | >    http://cran.r-project.org/web/packages/RcppEigen/vignettes/RcppEigen-intro-nojss.pdf    That code is in the package.
> | >
> | >  b) The CRAN package robustHD implements robust high-dimensional data methods
> | >    using RcppArmadillo; Andreas Alfons also chose to provide an RcppEigen based
> | >    'drop-in' that can be used where Eigen works and as I recall he stated
> | >    issues on OS X.  Andreas sent me some comparisons which generally showed
> | >    another slight pick-up from Eigen comparable to what a) shows.  Andreas
> | >    also posted here, though no real benchmarks.
> | >
> | > Hope this helps,  Dirk
> | >
> | > --
> | > R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
> | > See agenda, registration details and more at http://www.RinFinance.com
>
> --
> R/Finance 2012 Conference on May 11 and 12, 2012 at UIC in Chicago, IL
> See agenda, registration details and more at http://www.RinFinance.com


More information about the Rcpp-devel mailing list