hashgraph / hashgraph/pbj

Improve performance: CharBufferToWritableSequentialData.read/writeBytes

Open
#198 0 comments 0 reactions 0 assignees View on GitHub
Good First Issue
Dominant language
Java
Stars
44
Forks
15
Avg merge
1d 15h
Merged PRs (30d)
12

Description

The `CharBufferToWritableSequentialData` implements the `WritableSequentialData` and `ReadableSequentialData` interfaces. However, it delegates bulk operations to the default implementations in these interfaces which are slow because they run explicit loops calling read/writeByte (note the singular) methods for each individual byte.

All these operations can be potentially optimized if the read/writeBytes (note the plural) methods are overridden in `CharBufferToWritableSequentialData` to use bulk data transfers (like Arrays.copy and similar.)

For more details, see https://github.com/hashgraph/pbj/issues/191

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.