Hacker News new | ask | show | jobs
by code-faster 458 days ago
Could you release a fork of jq whose make does all this fanciness? I use jq A LOT so would love a turnkey solution to make it faster.
3 comments

https://github.com/01mf02/jaq?tab=readme-ov-file#performance

jaq runs 5x faster on my machine in some cases

jaq is nice. It just loses, performance-wise, to the final step in this article, and it can't do the second mentioned workload (yet) so I didn't include it.
Which workload can't it do? I've had good success with jaq performance.
It bombs out on the jq program I use for the 2nd corpus that I mentioned. On further investigation, the show-stopping filter is strftime. In the jaq readme this is the only not-yet-checked box in the compatibility list, so perhaps some day soon.
Not a fork but a similar program I've been using: https://github.com/tidwall/jj?tab=readme-ov-file#performance
If I had the time to fork jq, I would convert the relevant part to C++ so it doesn't spend literally all of its time dynamically allocating strings it is just about to discard.
Why does that require C++? A quick search showed up plenty of material about "pure C" arena allocators, etc.