Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal changes that are needed to at least get the code to compile #4

Merged
merged 4 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ const parsedJSON = simdjson.parse(jsonString) // parsed JSON object

## Benchmarks

Requirements: git, npm, node, a linux-like system, a recent compiler (GCC,clang)

To benchmark directly from the project:

```
git clone https://github.com/luizperes/simdjson_nodejs.git
cd simdjson_nodejs
npm install
cd benchmark
node benchmark
```


| filename | JSON file | simdjson file |
| :---------------: | :------------: | :-------------: |
| apache_builds.json | 0.0007187123801716652 | 0.00013120465355748363 |
Expand Down
8 changes: 5 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"targets": [{
"target_name": "simdjson",
"default_configuration": "Release",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"sources": [
"cflags_cc!": [ "-fno-exceptions", "-std=gnu++0x", "-std=gnu++1y" ],
"cflags_cc+": ["-march=native", "-std=c++17"],
"sources": [
"simdjson/main.cpp",
"simdjson/bindings.cpp",
"simdjson/src/simdjson.cpp"
],
'include_dirs': [
"<!@(node -p \"require('node-addon-api').include\")"
],
"libraries": ["~/Projects/simdjson/build/libsimdjson.0.0.1.dylib"],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
const simdjson = require('./build/Release/simdjson.node');

module.exports = simdjson;
module.exports = simdjson;
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"homepage": "https://github.com/luizperes/simdjson_nodejs#readme",
"devDependencies": {
"benchmark": "^2.1.4",
"node-gyp": "^3.8.0"
},
"dependencies": {
Expand Down