Image 1 — huntclaw - a fast find-and-replace utility in Zig
Image 2 — huntclaw - a fast find-and-replace utility in Zig
▲ 54 r/Zig

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.4

huntclaw on GitHub: https://github.com/tigerlang/huntclaw

u/ReindeerSimilar2748 — 2 days ago

I wrote a lightweight backend compiler SSBE

I've always valued compactness, and a minimal number of dependencies in any program or project. It's practically impossible to find a compiler backend like that, so I built it myself

Right now, SSBE isn't a production-grade backend, but it can be used for simple projects.
The backend is used as a dynamic library (libssbe), so it needs to be linked into the binary (which may be easier and more convenient than a separate binary)

It currently supports only x86_64 Linux; I plan to add Windows support in the future.

I look forward to your feedback
Github: https://github.com/tigerlang/ssbe

u/ReindeerSimilar2748 — 7 days ago

I wrote a lightweight backend compiler SSBE

I've always valued compactness, and a minimal number of dependencies in any program or project. It's practically impossible to find a compiler backend like that, so I built it myself

Right now, SSBE isn't a production-grade backend, but it can be used for simple projects.
The backend is used as a dynamic library (libssbe), so it needs to be linked into the binary (which may be easier and more convenient than a separate binary)

It currently supports only x86_64 Linux; I plan to add Windows support in the future.

I look forward to your feedback
Github: https://github.com/tigerlang/ssbe

reddit.com
u/ReindeerSimilar2748 — 8 days ago
▲ 3 r/coolgithubprojects+1 crossposts

huntclaw - fastest find-and-replace utility (without marketing)

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, which is also implemented in huntclaw.

The benchmark also shows that ripgrep is faster at sparse searches, which makes sense, since it’s an excellent utility with SIMD pre-filtering and optimizations far superior to huntclaw—though the gap isn’t that big.
I look forward to your feedback or comments.

Thanks for reading!

huntclaw on GitHub: https://github.com/tigerlang/huntclaw

u/ReindeerSimilar2748 — 8 days ago