<p>Turns out omp + pointer is the fastest approach. The code is now updated to use openmp + pointer.</p>

<p>1000 iterations on 1000 by 10000 matrix:</p>

<pre><code>binarize_all: 140.256035s             // just iterating through matrix
binarize_all_omp: 120.522770s    // openmp(4 threads)
binarize_all_omp: 31.964506s      // openmp(4 threads) + pointer 
</code></pre>

<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/pull/666#issuecomment-225853038">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFDW-I6_2qfIFtXyT2t4yENZiq-XXks5qLo-rgaJpZM4IsxhK">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEIitti97tsl_Cxf9D4kGExuuIBbks5qLo-rgaJpZM4IsxhK.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/pull/666#issuecomment-225853038"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>