Skip to content

Commit

Permalink
Merge branch 'master' of github.com:davesnx/query-json
Browse files Browse the repository at this point in the history
* 'master' of github.com:davesnx/query-json:
  Fix typos in README.md
  • Loading branch information
davesnx committed Sep 15, 2020
2 parents 2372d1b + c6c992c commit b35be0e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

---

**query-json** is a [faster](#Performance) and simpler re-implementation of the [jq language](https://github.com/stedolan/jq/wiki/jq-Language-Description) in [Reason Native](https://reasonml.github.io/docs/en/native) and compiled to binary thanks to OCaml. **query-json**, allows you to write small programs to operate on top of json files in a cute syntax:
**query-json** is a [faster](#Performance) and simpler re-implementation of the [jq language](https://github.com/stedolan/jq/wiki/jq-Language-Description) in [Reason Native](https://reasonml.github.io/docs/en/native) and compiled to binary thanks to the OCaml compiler. **query-json**, allows you to write small programs to operate on top of json files in a cute syntax:

```bash
query-json ".store.books | filter(.price > 10)" stores.json
Expand Down Expand Up @@ -83,17 +83,17 @@ alias q="query-json"

## Performance

[This report](./benchmarks/report.md) is not a exaustive performance report of both tools, it's a overview for the percived performance of the user. Here I don't profile each tool and trying to see what are the bootlenecks, since I asume that both tools have the penalty of parsing a JSON file. Simply run a bash script and analyze the results.
[This report](./benchmarks/report.md) is not an exhaustive performance report of both tools, it's a overview for the percieved performance of the user. Here I don't profile each tool and try to see what are the bootlenecks, since I assume that both tools have the penalty of parsing a JSON file. Simply run a bash script and analyze the results.

Aside from that, **query-json** isn't feature parity with **jq** which is ok at this point, but **jq** contains a ton of functionality that query-json misses and some of the **jq** operations aren't native, are builtin with the runtime. In order to do a proper comparision all of this above would need to take into consideration.
Aside from that, **query-json** doesn't have feature parity with **jq** which is ok at this point, but **jq** contains a ton of functionality that query-json misses and some of the **jq** operations aren't native, are builtin with the runtime. In order to do a proper comparision all of this above would need to take into consideration.

The report shows that **query-json** is between 2x and 5x faster than **jq** in all operations tested and same speed (~1.1x) with huge files (> 100M).

## Purpose

The purposes of this project were mostly 2:

- **Learn how to write a lexer/parser/compiler with the OCaml stack** using menhir and sedlex while trying to create a compiler with great error messages and possibly recoverability (currently _work in progress_).
- **Learn how to write a lexer/parser/compiler with the OCaml stack** using `menhir` and `sedlex` while trying to create a compiler with great error messages and possibly recoverability (currently _work in progress_).
- **Create a CLI tool in Reason Native** and being able to distribute it as a binary, enjoy it's performance and try further with cross-compilation.

## Currently supported feature set:
Expand Down Expand Up @@ -195,8 +195,8 @@ Requirements: [esy](https://esy.sh)
```bash
git clone https://github.com/davesnx/query-json
cd query-json
esy # installs everything
esy test # runs unit tests with [rely](https://reason-native.com/docs/rely), defined under test/.
esy # installs
esy test # runs unit tests with [rely](https://reason-native.com/docs/rely), live under test/.
esy bin # Run binary
```

Expand Down

0 comments on commit b35be0e

Please sign in to comment.