Add Reader.read_row
for decoding into caller-provided buffer.
#493
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
Reader.read_row
for decoding into caller-provided buffer.Reader.read_row
is an alternative toReader.next_row
.Reader.next_row
is convenient when the caller doesn't want to managetheir own buffer, and doesn't mind having extended borrows on
Reader
to accommodate
Row
data.Reader.read_row
avoids an extra copy in some scanarioswhich may lead to better runtime performance - see the benchmark
results below.
The PR adds a
row-by-row/128x128-4k-idat
benchmark (initially based onReader.next_row
which requires an extra copy). Using the newReader.read_row
results in the following performance gains in thebenchmark:
time: [-16.414% -16.196% -15.969%] (p = 0.00 < 0.05)
time: [-15.570% -15.218% -14.856%] (p = 0.00 < 0.05)
time: [-16.101% -15.864% -15.629%] (p = 0.00 < 0.05)