[mlpack-git] [mlpack/mlpack] LSH optimization: LSHSearch::ReturnIndicesFromTable uses less memory (#623)

Yannis Mentekidis notifications at github.com
Sat Apr 16 14:25:31 EDT 2016


The current code allocates space equal to the reference set and then uses arma::find to identify non-zero indices which were returned as the candidate set. This results in large memory allocations and slows down candidate search.

My change loops over the hash tables twice, first counting the number of reference points in the same bucket as the query and then a second time to actually add candidates to the reference set. This provides a small performance bump which should get more significant for larger reference sets.
You can view, comment on, or merge this pull request online at:

  https://github.com/mlpack/mlpack/pull/623

-- Commit Summary --

  * LSHSearch optimization to use less memory, first working copy
  * LSHSearch Optimization: ReturnIndicesFromTable uses less memory

-- File Changes --

    M src/mlpack/methods/lsh/lsh_search_impl.hpp (46)

-- Patch Links --

https://github.com/mlpack/mlpack/pull/623.patch
https://github.com/mlpack/mlpack/pull/623.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/623
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160416/374a41c1/attachment.html>


More information about the mlpack-git mailing list