CurtHagenlocher commented on issue #341:
URL: https://github.com/apache/arrow-dotnet/issues/341#issuecomment-4340663349

   The main advantage of `IBufferWriter<byte>` is that in principle it can 
reduce the number of copies made of data and remove intermediate allocations. I 
suspect that `IBufferWriterExtensions.AsStream` helps with one of these by 
using an underlying sequence of buffers instead of a single long buffer that 
needs to be reallocated when its end is reached, but it wouldn't avoid the need 
for an intermediate buffer to e.g. write a serialized int32. But if you really 
wanted to "max out" that pattern, I think you'd also want to extend it to the 
FlatBuffers layer -- which today uses a temporary resizable `ByteBuffer` whose 
semantics I think don't translate that wall to `IBufferWriter`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to