Skip to content

Instantly share code, notes, and snippets.

@coolbutuseless
Created January 17, 2024 21:43
Show Gist options
  • Select an option

  • Save coolbutuseless/2ec6263e37815e8ba04fa805f1acc621 to your computer and use it in GitHub Desktop.

Select an option

Save coolbutuseless/2ec6263e37815e8ba04fa805f1acc621 to your computer and use it in GitHub Desktop.

Revisions

  1. coolbutuseless created this gist Jan 17, 2024.
    13 changes: 13 additions & 0 deletions simplebenchmark-yyjsonr.R
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@

    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")