jhorstmann commented on pull request #9032: URL: https://github.com/apache/arrow/pull/9032#issuecomment-751845418
I think `Buffer::from` currently does another copy of the vec contents because it does not take ownership and because of the current alignment and padding requirements. We probably could add a zero-copy `Buffer::from_vec` method if we loosen those restrictions. Another interesting benchmark would be another version of `from_slice` that returns a `Vec` instead of `Buffer`, to see whether the extend/reallocate logic itself could be optimized. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
