Skip to content
Back to formatted view

Raw Message

Message-ID: <22630.21115.213619.66209@max.nulle.part>
Date: 2016-12-30T12:26:35Z
From: Dirk Eddelbuettel
Subject: [Rcpp-devel] [small ann] Sparse++
In-Reply-To: <CAJdZCv3j7-DW4HkaSkNs-uHcMwc7s2+YUOhJT6Yrz=k05ggN8A@mail.gmail.com>

On 30 December 2016 at 15:49, Dmitriy Selivanov wrote:
| 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.

Thanks, possibly very useful.

Now, should it have at least a 'Suggests: Rcpp' if the example requires it,
\dontrun{} or not?  Also examine whose project you're posting on.

Sure it "could" be used from R without Rcpp.  But how likely is that?
Suggests is for exactly that reason, at least in my book.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org