From 6121eb74a8e127fbeb64556650244313aa22b014 Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sat, 21 Jan 2023 16:12:23 -0600 Subject: [PATCH] Simplify to C++17 by default, add .editorconfig --- .editorconfig | 21 +++++++++++++++++++++ ChangeLog | 8 +++++++- DESCRIPTION | 10 +++++----- README.md | 17 +++++++++-------- cleanup | 2 +- inst/NEWS.Rd | 9 +++++---- configure => local/configure | 0 src/{Makevars.in => Makevars} | 2 +- 8 files changed, 49 insertions(+), 20 deletions(-) create mode 100644 .editorconfig rename configure => local/configure (100%) rename src/{Makevars.in => Makevars} (88%) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..c971b748 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +# Matches multiple files with brace expansion notation +# 4 space indentation +[*.{c,cpp,h,hpp,R,r}] +indent_style = space +indent_size = 4 + +# Tab indentation (no size specified) +[Makefile] +indent_style = tab + diff --git a/ChangeLog b/ChangeLog index bd1bba69..e8ae1a49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,18 @@ 2023-01-21 Dirk Eddelbuettel + * DESCRIPTION (Version, Date): Roll minor version and date + * inst/include/simdjson.cpp: Updated to simdjson 3.0.1 * inst/include/simdjson.h: Idem * src/simdjson_example.cpp (unsupportedArchitecture): Update to use 'simdjson::get_active_implementation()->name()' + * .editorconfig: Added + + * configure: Retired and removed + * src/Makevars: Moved from Makevars.in, C++17 now default + 2023-01-20 Dirk Eddelbuettel * DESCRIPTION (Version, Date): Roll minor version and date @@ -558,4 +565,3 @@ * README.md: Added * .Rbuildignore: Exclude the largers example JSON files - diff --git a/DESCRIPTION b/DESCRIPTION index aa2dde0e..12347d39 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,21 +1,21 @@ Package: RcppSimdJson Type: Package Title: 'Rcpp' Bindings for the 'simdjson' Header-Only Library for 'JSON' Parsing -Version: 0.1.8.1 -Date: 2023-01-20 +Version: 0.1.8.2 +Date: 2023-01-21 Author: Dirk Eddelbuettel, Brendan Knapp, Daniel Lemire Maintainer: Dirk Eddelbuettel Description: The 'JSON' format is ubiquitous for data interchange, and the - 'simdjson' library written by Daniel Lemire (and many contributors) provides + 'simdjson' library written by Daniel Lemire (and many contributors) provides a high-performance parser for these files which by relying on parallel 'SIMD' instruction manages to parse these files as faster than disk speed. See the - paper for more details about 'simdjson'. This package + paper for more details about 'simdjson'. This package parses 'JSON' from string, file, or remote URLs under a variety of settings. License: GPL (>= 2) Imports: Rcpp, utils LinkingTo: Rcpp Suggests: bit64, tinytest -SystemRequirements: A C++17 compiler is currently required +SystemRequirements: A C++17 compiler is required URL: https://github.com/eddelbuettel/rcppsimdjson/ BugReports: https://github.com/eddelbuettel/rcppsimdjson/issues RoxygenNote: 7.1.1 diff --git a/README.md b/README.md index d5043a52..07d4ef09 100644 --- a/README.md +++ b/README.md @@ -41,12 +41,12 @@ A [simple parsing benchmark](demo/simpleBenchmark.R) against four other R-access 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 + 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> +R> ``` Or in chart form: @@ -55,9 +55,10 @@ Or in chart form: ### Status -As of version 0.1.0, all three major OSs are supported, and JSON can be parsed from file and string -under a variety of settings. Prefers a real C++17 compiler but can fall back to older -compiler. Still subject to change. +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](https://github.com/eddelbuettel/rcppsimdjson/blob/master/src/Makevars) +accordingly if need be. ### Contributing diff --git a/cleanup b/cleanup index 02dded0f..e2a8cc6a 100755 --- a/cleanup +++ b/cleanup @@ -1,3 +1,3 @@ #!/bin/sh -rm -f src/*.o src/*.so src/Makevars +rm -f src/*.o src/*.so diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index a04c4a26..de5be963 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -3,11 +3,13 @@ \newcommand{\ghpr}{\href{https://github.com/eddelbuettel/rcppsimdjson/pull/#1}{##1}} \newcommand{\ghit}{\href{https://github.com/eddelbuettel/rcppsimdjson/issues/#1}{##1}} -\section{Changes in version 0.1.9 (2022-10-18)}{ +\section{Changes in version 0.1.9 (2023-01-21)}{ \itemize{ \item The internal function {deseralize_json} is now exported at the C++ - level as well as in R (Dirk in \ghpr{81} closing \ghit{80}) - \item \pkg{simdjson} was upgraded to version 3.0.1 (Dirk in \ghpr{83}) + level as well as in R (Dirk in \ghpr{81} closing \ghit{80}). + \item \pkg{simdjson} was upgraded to version 3.0.1 (Dirk in \ghpr{83}). + \item The package now defaults to C++17 compilation; \code{configure} has + been retired (Dirk closing \ghit{82}). } } @@ -165,4 +167,3 @@ Policy via \code{#define} } } - diff --git a/configure b/local/configure similarity index 100% rename from configure rename to local/configure diff --git a/src/Makevars.in b/src/Makevars similarity index 88% rename from src/Makevars.in rename to src/Makevars index de4fe6b9..a21eedea 100644 --- a/src/Makevars.in +++ b/src/Makevars @@ -1,6 +1,6 @@ ## -*- mode: makefile; -*- -CXX_STD = @CXXSTD@ +CXX_STD = CXX17 PKG_CXXFLAGS = -DSIMDJSON_NO_COMPUTED_GOTO -I../inst/include $(SHLIB_OPENMP_CXXFLAGS) PKG_LIBS= $(SHLIB_OPENMP_CXXFLAGS)