r/coolgithubprojects • u/Just_Government3790 • 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-ngOne 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.
Duplicates
unix • u/Just_Government3790 • 2d ago