Skip to content

Commit

Permalink
Simplify to C++17 by default, add .editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Jan 21, 2023
1 parent 6eed571 commit 6121eb7
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 20 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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

8 changes: 7 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
2023-01-21 Dirk Eddelbuettel <edd@debian.org>

* 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 <edd@debian.org>

* DESCRIPTION (Version, Date): Roll minor version and date
Expand Down Expand Up @@ -558,4 +565,3 @@
* README.md: Added

* .Rbuildignore: Exclude the largers example JSON files

10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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 <edd@debian.org>
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
<arXiv:1902.08318> paper for more details about 'simdjson'. This package
<arXiv:1902.08318> 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
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion cleanup
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

rm -f src/*.o src/*.so src/Makevars
rm -f src/*.o src/*.so
9 changes: 5 additions & 4 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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}).
}
}

Expand Down Expand Up @@ -165,4 +167,3 @@
Policy via \code{#define}
}
}

File renamed without changes.
2 changes: 1 addition & 1 deletion src/Makevars.in → src/Makevars
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 6121eb7

Please sign in to comment.