Improve performance: ReadableSequentialData.readBytes(ByteBuffer)
Open
Good First Issue
- Dominant language
- Java
- Stars
- 44
- Forks
- 15
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Description
The `ReadableSequentialData.readBytes(ByteBuffer)` implementations have a fast path when the input buffer's `hasArray()` is true, or sometimes when the buffer `isDirect()`. Otherwise they delegate to the parent interface implementation which is slow as it runs a loop for every individual byte.
Find a way to optimize all the implementations for any type of the input buffer, perhaps using some `Unsafe` methods.
For more details, see https://github.com/hashgraph/pbj/issues/191
Contributor guide
Assessment
This issue has not been assessed yet.