Skip to content

Allow batched diffing of slices with a custom comparer #210

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

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

dsnet
Copy link
Collaborator

@dsnet dsnet commented Jun 9, 2020

For correctness, cmp checks applicability of the options to every
element in a slice. For large []byte, this is a significant performance
detriment. The workaround is to specify Comparer(bytes.Equal).
However, we would still like to have the batched diffing if the
slices are different. Specialize for this situation.

@dsnet dsnet requested a review from cybrcodr June 9, 2020 18:13
For correctness, cmp checks applicability of the options for every
element in a slice. For large []byte, this is a significant performance
detriment. The workaround is to specify Comparer(bytes.Equal).
However, we would still like to have the batched diffing if the
slices are different. Specialize for this situation.
@dsnet dsnet force-pushed the diff-slice-custom branch from d5c5413 to 0b6dce6 Compare June 10, 2020 18:04
@dsnet dsnet merged commit 88849e8 into master Jun 10, 2020
@dsnet dsnet deleted the diff-slice-custom branch June 10, 2020 18:08
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