Xian,

Your comment is ridiculous.  

You know nothing about my application, size or data, or other transformation on 
the data.  

I can assure you that using Rcpp speeds up my process by a factor of at least 
100.  I don't know how you measure things, but in my world, that is a VERY 
appropriate use of Rcpp.

To make such a blind statement is ignorant and insulting.


--
Noah Silverman
UCLA Department of Statistics
8117 Math Sciences Building #8208
Los Angeles, CA 90095

On Sep 22, 2011, at 3:43 AM, Christian Gunning wrote:

> I think this is the current prize-winner of inappropriate use of Rcpp...
> How about using R to sort your vector?!
> This isn't really an Rcpp question, but since you asked, .push_back()
> is a great way to slow yourself down.
> 
> hth :)
> -xian
> 
> On Thu, Sep 22, 2011 at 3:00 AM,
> <[email protected]> wrote:
>> 
>>        body="
>>                std::vector<double> data;
>> 
>>                for(int i=0; i != 20; i++){
>>                        data.push_back(i);
>>                }
>>                std::sort(data.front(), data.back());
>>                return Rcpp::wrap(data);
>>        "
>> )
> 
> 
> 
> -- 
> A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!

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

Reply via email to