You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/27 11:02:57 UTC

[GitHub] [arrow] jhorstmann commented on pull request #9329: [Rust] [Experiment] Replace `Arc` by `ArrayData` in all arrays

jhorstmann commented on pull request #9329:
URL: https://github.com/apache/arrow/pull/9329#issuecomment-768208269


   How cheap cloning of the ArrayData struct is probably depends a lot on the datatype. The removed indirection seems to be beneficial, but instead we now need to clone all fields, which include
   
    - the datatype enum, which can include boxes/vecs of nested types and the field metadata
    - the vec of buffers, and cloning a buffer would include cloning the `Arc<Bytes>`
   
   So for primitive types, removing the arc should be a benefit because of less indirection when accessing it, it would still need to allocates vectors and clone the Arc which is inside the Buffer.
   
   For more complex types, cloning the DataType enum itself and multiple buffers could be slower than the speedup gained by less indirection.


----------------------------------------------------------------
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:
users@infra.apache.org