[Rcpp-devel] Rcpp speed

Dirk Eddelbuettel edd at debian.org
Tue Dec 21 16:53:25 CET 2010

On 21 December 2010 at 10:46, Gabor Grothendieck wrote:
| Thanks. That and Dirk's last post do seem to explain a large part of
| the difference.
| I agree it would still be a good idea to try to understand why the
| ratio increases even when we eliminate the coercion and if there is
| anything that can be done about it.

Romain hinted that he may take a look.  
| I am sure my benchmark is a bit lame although it did bring out some
| issues nevertheless.  It would be a good idea to generate some
| benchmarks USING SUGAR to see what kind of speed ups can be achieved.

Absolutely.  Our most recent slide deck (eg from the Google Talk) has a page
on sugar benchmark and we do see some inconsistent results.  Some things are
plenty fast, some not so much.  There is undoubtedly scope for improvements
but it is also mostly template metaprogramming which is ... difficult.

That said, sugar is still pretty new.  So yes, what you suggest is a great
idea and we would surely welcome help in constructing test and timing
harnesses and batteries.

| Since there is a degree of effort in getting into all this I sure
| would like to see benchmarks that show it will likely pay off in
| improved performance before spending too much time on this.
| P.S. In Dirk's post we don't need the L's in the seq expressions since
| m:n is integer anyways in those cases; however, in y <- 10 * x we do
| need 10L.

Yes. Also '0.0 + 1:10' created a numeric sequence so we could have used that
on your original code.

Cheers, Dirk

Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com

More information about the Rcpp-devel mailing list