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

Optimize BufferView implementations #4884

Closed
andreipaduroiu opened this issue Jun 19, 2020 · 0 comments · Fixed by #5283
Closed

Optimize BufferView implementations #4884

andreipaduroiu opened this issue Jun 19, 2020 · 0 comments · Fixed by #5283
Assignees
Labels

Comments

@andreipaduroiu
Copy link
Member

andreipaduroiu commented Jun 19, 2020

Problem description
Consider the following classes and/or methods:

  • BitConverter.readInt, BitConverterreadLong` (and all associated overloads and methods)
  • ByteArraySegment
  • BufferView.equals
  • ByteArrayComparator

Explore ways to have these use as much native code/HW instructionset as possible in order to make them more efficient.

Problem location
Common.

Suggestions for an improvement

  1. Consider using ByteBuffer inside ByteArraySegment.
  2. Consider upgrading to Java 11 and make use of the intrisic methods added in the java.util.Arrays class.
  3. Rename ByteArrayComparator to BitwiseComparator and expose 3 final members: ByteArrayComparator, ArrayViewComparator and BufferViewComparator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant