Skip to content

Instantly share code, notes, and snippets.

@coolbutuseless
Created January 17, 2024 21:43
Show Gist options
  • Save coolbutuseless/2ec6263e37815e8ba04fa805f1acc621 to your computer and use it in GitHub Desktop.
Save coolbutuseless/2ec6263e37815e8ba04fa805f1acc621 to your computer and use it in GitHub Desktop.
rcppsimdjson simplebenchmark including yyjsonr
file <- system.file("jsonexamples", "twitter.json", package="RcppSimdJson")
jsontxt <- readLines(file)
res <- microbenchmark::microbenchmark(jsonify = jsonify::validate_json(jsontxt),
jsonlite = jsonlite::validate(jsontxt),
simdjson = RcppSimdJson::validateJSON(file),
ndjson = ndjson::validate(file),
RJSONIO = RJSONIO::isValidJSON(file),
yyjsonr = yyjsonr::validate_json_file(file),
times = 100L)
print(res, order="median")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment