On Tue, Nov 20, 2012 at 9:54 AM, Hadley Wickham <[email protected]> wrote:

> > P.S. I don't think the sugar versions can be made any quicker, because
> > they have to allocate intermediate vectors, and do more memory copies.
>
> 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".


>
> Hadley
>
> --
> RStudio / Rice University
> http://had.co.nz/
> _______________________________________________
> Rcpp-devel mailing list
> [email protected]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to