jorisvandenbossche commented on PR #340: URL: https://github.com/apache/arrow-nanoarrow/pull/340#issuecomment-1884994975
> This involved fixing the existing `BufferView` since to print their contents in a repr-friendly way the elements had to be accessed. I think the `BufferView` will see some changes but it does seem relatively performant: A better comparison is probably numpy, because the pyarrow's `to_pylist` is notoriously slow (): ``` In [76]: %timeit list(na_array_view.buffer(1)) 93.6 ms ± 8.57 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) In [78]: %timeit np_array.tolist() 22.5 ms ± 622 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) ``` But still not too bad ;) And the memoryview option I mentioned: ``` In [81]: %timeit memoryview(np_array).tolist() 31.3 ms ± 1.38 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) ``` -- 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]
