All Projects → eddelbuettel → rcppsimdjson

eddelbuettel / rcppsimdjson

Licence: other
Rcpp Bindings for the 'simdjson' Header Library

Programming Languages

C++
36643 projects - #6 most used programming language
r
7636 projects

Projects that are alternatives of or similar to rcppsimdjson

Mlr
Machine Learning in R
Stars: ✭ 1,542 (+1397.09%)
Mutual labels:  cran, r-package
Pinp
Pinp Is Not PNAS -- Two-Column PDF Template
Stars: ✭ 134 (+30.1%)
Mutual labels:  cran, r-package
Minicran
R package to create internally consistent, mini version of CRAN
Stars: ✭ 123 (+19.42%)
Mutual labels:  cran, r-package
rdomains
Classifying the content of domains
Stars: ✭ 47 (-54.37%)
Mutual labels:  cran, r-package
Arsenal
An Arsenal of 'R' Functions for Large-Scale Statistical Summaries
Stars: ✭ 171 (+66.02%)
Mutual labels:  cran, r-package
Wooldridge
The official R data package for "Introductory Econometrics: A Modern Approach". A vignette contains example models from each chapter.
Stars: ✭ 90 (-12.62%)
Mutual labels:  cran, r-package
Rblpapi
R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Stars: ✭ 133 (+29.13%)
Mutual labels:  cran, r-package
Configr
Implements the JSON, INI, YAML and TOML parser, for R setting and writing of configuration file.
Stars: ✭ 38 (-63.11%)
Mutual labels:  cran, r-package
Simmer
Discrete-Event Simulation for R
Stars: ✭ 170 (+65.05%)
Mutual labels:  cran, r-package
Webservices
CRAN WebTechnologies Task View
Stars: ✭ 160 (+55.34%)
Mutual labels:  cran, r-package
Markovchain
Easy Handling Discrete Time Markov Chains
Stars: ✭ 80 (-22.33%)
Mutual labels:  cran, r-package
Tint
Tint is not Tufte
Stars: ✭ 226 (+119.42%)
Mutual labels:  cran, r-package
Pkgsearch
Search R packages on CRAN
Stars: ✭ 73 (-29.13%)
Mutual labels:  cran, r-package
Rinside
Seamless embedding of R in C++ programs
Stars: ✭ 112 (+8.74%)
Mutual labels:  cran, r-package
Nanotime
Nanosecond Resolution Time Functionality for R
Stars: ✭ 39 (-62.14%)
Mutual labels:  cran, r-package
Drat
Drat R Archive Template
Stars: ✭ 127 (+23.3%)
Mutual labels:  cran, r-package
Dataexplorer
Automate Data Exploration and Treatment
Stars: ✭ 362 (+251.46%)
Mutual labels:  cran, r-package
Rcpp
Seamless R and C++ Integration
Stars: ✭ 572 (+455.34%)
Mutual labels:  cran, r-package
Osrm
Shortest Paths and Travel Time from OpenStreetMap with R
Stars: ✭ 160 (+55.34%)
Mutual labels:  cran, r-package
Pacman
A package management tools for R
Stars: ✭ 220 (+113.59%)
Mutual labels:  cran, r-package

RcppSimdJson: Rcpp Bindings for the simdjson Header Library

CI License CRAN Dependencies Downloads Code Coverage Last Commit

Motivation

simdjson by Daniel Lemire (with contributions by Geoff Langdale, John Keiser and many others) is an engineering marvel. Through very clever use of SIMD instructions, it manages to parse JSON files faster than disc access. Wut? Yes you read that right: parallel processing with so little overhead that the net throughput is limited only by disk speed.

Moreover, it is implemented in neat modern C++ and can be accessed as a header-only library. (Well, one library in two files, really.) Which makes R packaging easy and convenient and compelling. So here we are.

For further introduction, see the arXiv paper by Langdale and Lemire (out/to appear in VLDB Journal 28(6) as well) and/or the video of the recent talk by Daniel Lemire at QCon (voted best talk).

Example

jsonfile <- system.file("jsonexamples", "twitter.json", package="RcppSimdJson")
library(RcppSimdJson)
validateJSON(jsonfile)                  # validate a JSON file
res <- fload(jsonfile)                  # parse a JSON file

Comparison

A simple parsing benchmark against four other R-accessible JSON parsers:

R> res
Unit: milliseconds
     expr      min       lq     mean   median       uq       max neval  cld
 simdjson  1.87118  2.03252  2.24351  2.17228  2.27756   6.57145   100 a
  jsonify  8.91694  9.20124  9.58652  9.46077  9.73692  13.41707   100  b
  RJSONIO 10.49187 11.09410 11.69109 11.42555 11.95780  17.93653   100  b
   ndjson 27.04830 28.62251 31.44330 29.51343 32.05847 146.88221   100   c
 jsonlite 34.93334 36.54784 38.67843 37.74890 40.19555  46.32444   100    d
R>

Or in chart form:

Status

All three major OSs are supported, and JSON can be parsed from file and string under a variety of settings. A C++17 compiler is required for ease of setup (though the upstream can fall back to older compiler; one edit src/Makevars accordingly if need be.

Contributing

Any problems, bug reports, or features requests for the package can be submitted and handled most conveniently as Github issues in the repository.

Before submitting pull requests, it is frequently preferable to first discuss need and scope in such an issue ticket. See the file Contributing.md (in the Rcpp repo) for a brief discussion.

See Also

For standard JSON work on R, as well as for other nicely done C++ libraries, consider these:

Author

For the R package, Dirk Eddelbuettel and Brendan Knapp.

For everything pertaining to simdjson, Daniel Lemire (and many contributors).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].