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

Use syn-mid instead of syn + "full" #814

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

jrose-signal
Copy link
Contributor

Neon's use of syn is for the #[neon::main] macro, but that doesn't actually have to parse the function body to do its work. syn-mid treats the body as an opaque blob, which should be a little faster.

Neon's use of syn is for the #[neon::main] macro, but that doesn't
actually have to parse the function body to do its work. syn-mid
treats the body as an opaque blob, which should be a little faster.
@kjvalencik
Copy link
Member

In my not-so-scientific test, this knocked off 2s building the Node-API tests (10.5s to 8.5s). Most of that savings is compiling syn without full. The actual parsing is negligibly faster, even with the very large main function that the tests use.

Solid win! Thanks!

@kjvalencik kjvalencik merged commit 483b059 into neon-bindings:main Oct 21, 2021
@jrose-signal jrose-signal deleted the jrose/syn-mid branch October 21, 2021 16:42
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