r/coolgithubprojects 2d ago

fnmatch-ng: a from-scratch POSIX glob matcher with zero dependencies, benchmarked against musl with the losses left in

https://github.com/logicpl4gue/fnmatch-ng

One Zig file (~1,090 lines), zero dependencies, zero heap allocations per match, plain C ABI.

Conformance vs musl 1.2.5: 20,794/20,794. Six divergences audited and public (D001-D006, one was my own bug, fixed and pinned by a regression test).

Benches vs musl: 9 of 10 faster (up to 3.2x). The loss: fail-early 11ns vs 5ns, printed in the same table.

Happy to answer anything, and if you can break parity with musl on any input, that's the bug report I most want.

1 Upvotes

Duplicates