Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore peg example, turn into an actual parser #65

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

neocturne
Copy link
Contributor

I was interested in a benchmark for the peg crate, so I restored the example and implemented the actual parsing. The result is quite nice: On my machine it's only ~10% slower than winnow, and I find peg's grammars much easier to read than many of the alternatives.

This partially reverts commit 7fb35c5.
Turn the example into a valid benchmark by actually implementing a
parser, instead of only (badly) validating the JSON.

Unicode escape handling is still on the simplistic side, but it
shouldn't be worse than some of the other examples.
@epage
Copy link
Collaborator

epage commented Apr 3, 2024

For reference, removed in 7fb35c5

Peg has a sufficient number of downloads to be included..

@epage epage merged commit 5ad14a2 into rosetta-rs:main Apr 3, 2024
5 of 6 checks passed
@neocturne neocturne deleted the peg branch April 3, 2024 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants