Improve performance: WritableStreamingData.writeBytes(ByteBuffer)
Open
Good First Issue
- Dominant language
- Java
- Stars
- 44
- Forks
- 15
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 12
Description
The `WritableStreamingData.writeBytes(ByteBuffer)` method is only optimal when the input `ByteBuffer.hasArray()` is true. Otherwise it delegates to the parent interface where the implementation runs a loop for each individual byte, which is slow.
Find a way to optimize the implementation for buffers that don't have arrays (perhaps using `Unsafe` methods or similar.)
For more details, see https://github.com/hashgraph/pbj/issues/191
Contributor guide
Assessment
This issue has not been assessed yet.