<div dir="ltr">Hello mailing list. Just small announcement. I made package "sparsepp"  which brings bindings to header only 'sparsepp' library  - <a href="https://github.com/greg7mdp/sparsepp">https://github.com/greg7mdp/sparsepp</a>. It is on CRAN already. Sparse++ is improvement over google sparse hash library (see this write-up <a href="https://github.com/greg7mdp/sparsepp/blob/master/bench.md">https://github.com/greg7mdp/sparsepp/blob/master/bench.md</a>).<br clear="all"><div><br></div><div>Initially I evaluated it with my text2vec package, where main data structure is <font face="monospace, monospace"><span style="color:rgb(51,51,51);font-size:12px;white-space:pre">unordered_map< pair<</span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-size:12px;white-space:pre">uint32_t</span><span style="color:rgb(51,51,51);font-size:12px;white-space:pre">, </span><span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-size:12px;white-space:pre">uint32_t</span><span style="color:rgb(51,51,51);font-size:12px;white-space:pre">></span><span style="color:rgb(51,51,51);font-size:12px;white-space:pre">, T ></span></font><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre">, </span>where T is <font face="monospace, monospace">int</font> or <font face="monospace, monospace">float</font>.</div><div>In my case memory improvement was 2x and speed up was 1.5x (lookup and insert operations).</div><div><br></div><div>So I decided to build small package which can be used by other people (not text2vec only).</div><div><br></div><div>Usage is as usual </div><div><ol><li>add to DESCRIPTION of your package: <font face="monospace, monospace">LinkingTo: sparsepp</font></li><li>add <font face="monospace, monospace">#include <sparsepp.h></font> to you source/header <br></li><li>use <font face="monospace, monospace">spp::sparse_hash_map</font> as drop-in replacement for <font face="monospace, monospace">std::unordered_map</font>.</li></ol></div><div>-- </div><div class="gmail_signature"><div dir="ltr">Regards <div>Dmitriy Selivanov</div></div></div>
</div>