<p>In <a href="https://github.com/mlpack/mlpack/pull/700#discussion_r70054603">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -811,9 +841,18 @@ void LSHSearch&lt;SortPolicy&gt;::Search(const arma::mat&amp; querySet,
&gt;  
&gt;    Timer::Start(&quot;computing_neighbors&quot;);
&gt;  
&gt; -  // Go through every query point sequentially.
&gt; -  for (size_t i = 0; i &lt; querySet.n_cols; i++)
&gt; +  // Parallelization to process more than one query at a time.
&gt; +  // use as many threads possible but not more than allowed number
&gt; +  size_t numThreadsUsed = maxThreads;
&gt; +  #pragma omp parallel for \
&gt; +    num_threads ( numThreadsUsed )\
&gt; +    shared(avgIndicesReturned, resultingNeighbors, distances) \
&gt; +    schedule(dynamic)
</pre>
<p>About static vs dynamic scheduling, I ran some tests:</p>

<p>Sift100k</p>

<pre><code>dynamic: 0.086 +/- 0.008 s
 static: 0.093 +/- 0.014 s
</code></pre>

<p>phy</p>

<pre><code>dynamic: 3.35 +/- 0.124 s
 static: 3.46 +/- 0.203 s
</code></pre>

<p>Corel</p>

<pre><code>dynamic: 0.228 +/- 0.03 s
 static: 0.234 +/- 0.03 s
</code></pre>

<p>Miniboone</p>

<pre><code>dynamic: 0.711 +/- 0.07 s
 static: 0.701 +/- 0.09 s
</code></pre>

<p>In the first 3, I'd say dynamic is slightly faster. It's hard to tell for Miniboone because the standard deviation is much larger than the difference. I'll run covertype and pokerhand in a while when my PC is not used.</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/pull/700/files/c4c8ff950be8a06e06084764f188095c650b7a60#r70054603">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFNmTVQn2lK65V2lJqKuUSNYgxLERks5qTiWvgaJpZM4I5KSz">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFFgR4GBoNAXZCL_fDEdjltkIVzxtks5qTiWvgaJpZM4I5KSz.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/700/files/c4c8ff950be8a06e06084764f188095c650b7a60#r70054603"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>