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

State the performance #43

Closed
tacone opened this issue May 27, 2020 · 5 comments
Closed

State the performance #43

tacone opened this issue May 27, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@tacone
Copy link

tacone commented May 27, 2020

I suggest you to state whether jql is fast or not, and if the throughput is one of the goals of the project. As simple as it sounds, it may drive adoption.

Publishing benchmarks result may also help.

Good luck!

@yamafaktory yamafaktory added the enhancement New feature or request label May 28, 2020
@dufferzafar
Copy link

And perhaps a comparison (performance & feature set) with jq? : https://github.com/stedolan/jq/

@yamafaktory
Copy link
Owner

Thanks for the feedback!

At the moment, jql uses benchmarks internally as regression tests. You can see it in the Github Actions under the bench step, like here e.g. https://github.com/yamafaktory/jql/actions/runs/116121477.

I've never compared the performance against jq e.g. For sure, this is doable.

Regarding the feature set comparison, what would you expect? I don't have a deep knowledge of jq. It's clear that jq provides way more features than this tool but IMHO at the cost of being somehow bloated. I'm not sure if comparing both is fair as the objectives are quite different.

@yamafaktory
Copy link
Owner

A little update: I still don't know which feature(s) should have benchmarks or not and where to put that (maybe a link to another doc like BENCHMARKS.md). For example, jql uses rayon internally (https://github.com/rayon-rs/rayon/blob/master/FAQ.md) which makes it multi-threaded.

Given the following simple JSON nested arrays, let's say e.g. you want to flatten it (took the example from https://stedolan.github.io/jq/manual/#flatten,flatten(depth)):

[1, [2], [[3]]]

jq

echo '[1, [2], [[3]]]' | jq 'flatten' 
[
  1,
  2,
  3
]

time bash -c 'for i in `seq 1 1000` ; do echo '"'"'[1, [2], [[3]]]'"'"' | jq 'flatten' > /dev/null ; done'
bash -c   24.85s user 0.86s system 100% cpu 25.451 total

jql

echo '[1, [2], [[3]]]' | jql '...'           
[
  1,
  2,
  3
]

time bash -c 'for i in `seq 1 1000` ; do echo '"'"'[1, [2], [[3]]]'"'"' | jql '...' > /dev/null ; done'
bash -c   2.56s user 1.08s system 235% cpu 1.542 total

@yamafaktory
Copy link
Owner

yamafaktory commented Jun 1, 2020

I'll probably have a look at https://github.com/sharkdp/hyperfine and use it whenever I'll find some spare time.

@yamafaktory
Copy link
Owner

Some basic comparison benchmarks are now available here https://github.com/yamafaktory/jql/blob/master/PERFORMANCE.md (triggered every night).

I'll try to add more of them.

Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants