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

perf(parser): Reduce lookups for conflicts #4572

Merged
merged 3 commits into from Dec 22, 2022
Merged

Conversation

epage
Copy link
Member

@epage epage commented Dec 22, 2022

We already need to lookup every present-arg for conflicts, so we might
as well cache it ahead of time. This let's us move some operations to
be immutable so we can more easily cache other lookups.

For me, this gave a 70% speed improvement for #4516 with mixed results
on normal benchmarks

We already need to lookup every present-arg for conflicts, so we might
as well cache it ahead of time.  This let's us move some operations to
be immutable so we can more easily cache other lookups.

For me, this gave a 70% speed improvement for clap-rs#4516 with mixed results
on normal benchmarks
Didn't actually see much of a gain because this isn't in a hot loop but
thought I'd keep it.
@epage epage merged commit dcd5fec into clap-rs:master Dec 22, 2022
@epage epage deleted the group branch December 22, 2022 18:38
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.

None yet

1 participant