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 ByteArrayComparator to replace Arrays#compareUnsigned in some other places #11880

Merged
merged 8 commits into from Dec 8, 2022

Conversation

gf2121
Copy link
Contributor

@gf2121 gf2121 commented Oct 26, 2022

After #11876 I find some other codes are still usingArrays#compareUnAssigned which can be repaced by ByteArrayComparator or ArrayUtil#compareUnsigned4.

This PR replaced some of them that look performance sensitive.

@gf2121 gf2121 changed the title Use ByteArrayComparator to replace Arrays.compareUnAssigned in some other places Use ByteArrayComparator to replace Arrays#compareUnsigned( in some other places Oct 26, 2022
@gf2121 gf2121 changed the title Use ByteArrayComparator to replace Arrays#compareUnsigned( in some other places Use ByteArrayComparator to replace Arrays#compareUnsigned in some other places Oct 26, 2022
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

import org.apache.lucene.util.StringHelper;
import org.apache.lucene.util.SuppressForbidden;
import org.apache.lucene.util.Version;
import org.apache.lucene.util.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you undo this star import?

@jpountz
Copy link
Contributor

jpountz commented Nov 24, 2022

@gf2121 Let's merge this PR?

@gf2121
Copy link
Contributor Author

gf2121 commented Dec 8, 2022

@jpountz Sorry for being late, thank you for the review !

I'll merge this

@gf2121 gf2121 merged commit 9ff989e into apache:main Dec 8, 2022
gf2121 added a commit to gf2121/lucene that referenced this pull request Dec 8, 2022
gf2121 added a commit that referenced this pull request Dec 8, 2022
@rmuir rmuir added this to the 9.5.0 milestone Jan 17, 2023
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

3 participants