>
> |     We usually do
> |
> |      Rcpp::List ret = Rcpp::List::create(Rcpp::Named("pa", pa),
> |                                          Rcpp::Named("w", w);
> |                                          Rcpp::Named("xa", xa));
> |      return ret;
> |
> |     to avoid re-allocation.  But that is minuscule, and your code is
> arguably
> |     as easy or easier to read :)
> |
> |
> | Did I understand correctly that your proposal is to create return object
> all in
> | one spot to avoid changing it as I did three times?
>
> Yup!


Just a note. I see a little speedup using your return suggestion so once
again for this!

gg
_______________________________________________
Rcpp-devel mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to