[Rcpp-devel] R vectorisation vs. C++ vectorisation

Hadley Wickham h.wickham at gmail.com
Tue Nov 20 17:00:45 CET 2012


>> I don't think they _have_to - my understanding is that the expression
>> template approach is general enough that you could compile away those
>> intermediates.  It may be extremely difficult to do though!
>
> That's the issue in delayed evaluation.  You do a lot of template magic to
> discover how the result is going to be used before you evaluate it.  It has
> its place but for cases like this it seems like what Ed Deming would have
> called "burning the toast and then scraping it".

And it seems cleaner to implement it at the compiler level, e.g.
http://www.justintalbot.com/wp-content/uploads/2012/10/pact080talbot.pdf

Hadley

-- 
RStudio / Rice University
http://had.co.nz/


More information about the Rcpp-devel mailing list