-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Speed up writeGroupVInts #13203
Speed up writeGroupVInts #13203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good speedup!
return Integer.BYTES - (Integer.numberOfLeadingZeros(v | 1) >> 3); | ||
} | ||
|
||
public static void writeGroupVInts(DataOutput out, byte[] scratch, long[] values, int limit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some minimal javadocs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
Thanks for reviewing! |
# Conflicts: # lucene/CHANGES.txt
This change uses
VarHandles
instead ofBytesRefBuilder#append
to speed upwriteGroupVInts
, which is more aligned with group-varint generally implementation.Main:
PR: