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

ruleguard/typematch: replace Split with Index to avoid allocs #414

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

quasilyte
Copy link
Owner

We don't need to create []string to compare the substring. This change reduces the amount of allocations when comparing named types via typematch package.

We don't need to create `[]string` to compare the substring.
This change reduces the amount of allocations when comparing
named types via typematch package.
@quasilyte quasilyte merged commit ae42498 into master Oct 1, 2022
@quasilyte quasilyte deleted the quasilyte/optimize_opnamed_typematch branch October 1, 2022 12:27
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