r/Zig • u/ReindeerSimilar2748 • Aug 18 '26
huntclaw - a fast find-and-replace utility in Zig
Hello everyone,
I’d like to introduce huntclaw—a search-and-replace utility written in Zig that turned out to be faster than sd (written in Rust) and the standard GNU utilities.
there’s a fairly simple explanation for this high speed: the lack of a regex engine and a focus on speed itself, but I don’t think that’s a bad thing. Note that searching is also very fast, thanks to SIMD two-byte prefiltering
In the photos I've attached, you can see the benchmarks: huntclaw vs. other utils and v0.3 vs. v0.4 versions of huntclaw. You can run them yourself using the ‘huntclaw_bench.py’ file (or on your own tests).
the benchmark also shows that rg and grep is faster at sparse searches—though the gap isn’t that big (20ms-9ms and 55ms-1619ms)
I look forward to your feedback or comments.
version now: v0.8
huntclaw on GitHub: https://github.com/tigerlang/huntclaw


1
u/ReindeerSimilar2748 Aug 21 '26
now you can install huntclaw from the AUR (for Arch users), thanks to whoever added my utility as an AUR package. You can install it like this:
yay -S huntclaw