<p>I realized that we do not sort huge amounts of data. I corrected the test.<br>
With <code>-O3</code> <code>std::pair</code> is a little bit faster.<br>
If <code>n = 10</code>, <code>numIterations = 100M</code>:</p>

<pre><code>SortStruct results:
unnecessaryCodeRemovalPreventer = 1.09091e+08
sort duration = 33621ms
std::pair results:
unnecessaryCodeRemovalPreventer = 1.03127e+08
sort duration = 29536ms
</code></pre>

<p><a href="https://github.com/mlpack/mlpack/files/340950/main2.cpp.zip">main2.cpp.zip</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/issues/712#issuecomment-229590259">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFAOIgGMV2mYAqDokxu7SLOw4ZB7Nks5qQ3iRgaJpZM4JBmsJ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFAXv7npPGYhrAEWp8OX7UD7rMUAnks5qQ3iRgaJpZM4JBmsJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/712#issuecomment-229590259"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>