On 4 May 2015 at 14:23, Tim Keitt wrote:
| 
| 
| On Sun, May 3, 2015 at 11:29 PM, Antonio Piccolboni <anto...@piccolboni.info>
| wrote:
| 
|     Check hereĀ  for something similar to Tim's solution that preallocates all
|     vectors to avoid the costly push_back. Still needs the unlists in R, so
|     it's expensive in that dimension, the number of lists in the output.
| 
| 
| I may have a way around the unlist part; still needs testing.

Keep us posted.
 
| push_back is amortized constant so only a little costly.

But going from std::list to SEXP is one full copy.  Not so bad in the grand
scheme of things.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

Reply via email to