<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Xian,</div><div><br></div><div>Your comment is ridiculous. &nbsp;</div><div><br></div><div>You know nothing about my application, size or data, or other transformation on the data. &nbsp;</div><div><br></div><div>I can assure you that using Rcpp speeds up my process by a factor of at least 100. &nbsp;I don't know how you measure things, but in my world, that is a VERY appropriate use of Rcpp.</div><div><br></div><div>To make such a blind statement is ignorant and insulting.</div><div><br></div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>--</div><div>Noah Silverman</div><div>UCLA Department of Statistics</div><div>8117 Math Sciences Building #8208</div><div>Los Angeles, CA 90095</div></div></div></span></div></span></div></span></div></span></span>
</div>
<br><div><div>On Sep 22, 2011, at 3:43 AM, Christian Gunning wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I think this is the current prize-winner of inappropriate use of Rcpp...<br>How about using R to sort your vector?!<br>This isn't really an Rcpp question, but since you asked, .push_back()<br>is a great way to slow yourself down.<br><br>hth :)<br>-xian<br><br>On Thu, Sep 22, 2011 at 3:00 AM,<br>&lt;<a href="mailto:rcpp-devel-request@r-forge.wu-wien.ac.at">rcpp-devel-request@r-forge.wu-wien.ac.at</a>&gt; wrote:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp;body="<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;std::vector&lt;double&gt; data;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(int i=0; i != 20; i++){<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data.push_back(i);<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;std::sort(data.front(), data.back());<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return Rcpp::wrap(data);<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp; &nbsp;"<br></blockquote><blockquote type="cite">)<br></blockquote><br><br><br>-- <br>A man, a plan, a cat, a ham, a yak, a yam, a hat, a canal – Panama!<br></div></blockquote></div><br></body></html>