[Rcpp-devel] R.e. is std::sort function broken??

Noah Silverman noahsilverman at ucla.edu
Thu Sep 22 19:06:05 CEST 2011


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,
> <rcpp-devel-request at r-forge.wu-wien.ac.at> 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!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20110922/07aabad9/attachment.htm>


More information about the Rcpp-devel mailing list