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

Optimizations #95

Open
mindplay-dk opened this issue Aug 23, 2023 · 0 comments
Open

Optimizations #95

mindplay-dk opened this issue Aug 23, 2023 · 0 comments

Comments

@mindplay-dk
Copy link
Contributor

I was curious to see how Sigma would stack up against other parsers - the biggest benchmark I know is Chevrotain's, so I added Sigma's JSON parser example to it:

mindplay-dk/chevrotain@d8fd236

image

although it is 4 times slower than Chevrotain, Sigma is definitely in the lead 🙂

Chevrotain is the fastest JS parser library I know of, so it would probably be difficult to beat.

and of course, this is without making any attempts to optimize Sigma's implementation of the JSON parser at all.

I did a quick profile, and sequence looks like the biggest bottleneck at the moment:

image

it might be worth optimizing and benchmarking further - Chevrotain might be worth referencing for optimizations as well, I know the author put a lot of work into that.

as previously mentioned, performance is not the main reason I picked this library - but I do think it's important, and if there are any "easy wins", it might be worth while investigating this a bit further.

I might take a closer look at some point - just leaving this here for now. 🙂

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

No branches or pull requests

1 participant