[Rcpp-devel] [small ann] Sparse++

Dmitriy Selivanov selivanov.dmitriy at gmail.com
Fri Dec 30 12:49:42 CET 2016


Hello mailing list. Just small announcement. I made package "sparsepp"
 which brings bindings to header only 'sparsepp' library  -
https://github.com/greg7mdp/sparsepp. It is on CRAN already. Sparse++ is
improvement over google sparse hash library (see this write-up
https://github.com/greg7mdp/sparsepp/blob/master/bench.md).

Initially I evaluated it with my text2vec package, where main data
structure is unordered_map< pair<uint32_t, uint32_t>, T >, where T is int
or float.
In my case memory improvement was 2x and speed up was 1.5x (lookup and
insert operations).

So I decided to build small package which can be used by other people (not
text2vec only).

Usage is as usual

   1. add to DESCRIPTION of your package: LinkingTo: sparsepp
   2. add #include <sparsepp.h> to you source/header
   3. use spp::sparse_hash_map as drop-in replacement for std::unordered_map
   .

-- 
Regards
Dmitriy Selivanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20161230/d3038ad2/attachment.html>


More information about the Rcpp-devel mailing list