willtemperley commented on issue #154:
URL: https://github.com/apache/arrow-swift/issues/154#issuecomment-4211639837

   @abandy , thanks for the feedback! To clarify, when I mentioned IPC, I was 
specifically referring to the [Arrow IPC 
Format](https://arrow.apache.org/docs/cpp/api/ipc.html#reading-ipc-streams-and-files).
 With the current approach, all data is copied into ArrowBuffers rather than 
allowing a zero-copy view over backing storage. Perhaps this can be done 
without a buffer redesign though. Maybe @kou could shed some light on how Arrow 
CPP does this.
   
   Regarding the pointer arithmetic in arrays, I think we really should be 
making use of bound memory, by doing something like:
   
   ```
       let values: UnsafePointer<T>
   
       public subscript(index: Int) -> Int32 {
           return values[index]
       }
   }
   ```
   Instead of the the current setup, which is doing a lot of extra work:
   ```
   return self.arrowData.buffers[1].rawPointer.advanced(by: 
byteOffset).load(as: T.self)
   ```
   
   Perhaps the buffer work could be done without a breaking change. 
   
   Yes I'd be happy to meet up and discuss this.
   


-- 
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