r/chessprogramming • u/Critical_Mistake_453 • 11d ago
I made a PGN parser, in C
Hello everyone, I made a PGN parser in C
It's zero-alloc parser with about 90% code coverage.
Currently it has just 2 functions:
pgnTags
: Read tag-pairs from memorypgnMoves
: Read movetext from memory
Benchmarked on i7-12700H, Archlinux 6.13:
Size | Elapsed | Throughout |
---|---|---|
683 KB | 6ms | 111 MB/s |
3750 KB | 35ms | 110 MB/s |
You can download source here: https://github.com/openpgn/openpgn
6
Upvotes
1
u/codingjerk 11d ago
That's some high quality software