expr
expr copied to clipboard
Thanks, expr and gjson are awesome.
Just FYI: I made a tool for my work named jef
that combines GJSON and this expr package to filter newline delimited json with.
In my test on a file with 1 million JSON records, that jef
tool is about 17 times faster than jq is. And I owe it all to you!
% time jq '.favourite_color="Beige"' < testdata/users_1m.nljson > /dev/null
jq '.favourite_color="Beige"' < testdata/users_1m.nljson > /dev/null 17.57s user 0.30s system 98% cpu 18.065 total
% time ./jef -i testdata/users_1m.nljson -e 'favourite_color == "Beige"' >/dev/null
./jef -i testdata/users_1m.nljson -e 'favourite_color == "Beige"' > /dev/null 1.07s user 0.25s system 100% cpu 1.311 total
So, thanks a lot and keep up the great work! Feel free to close this after reading.