You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug, including details regarding any error messages, version, and platform.
I was looking around the internet for why Arrow's IPC is essentially the speed of going to disk, and I came upon a post on stackoverflow from 2022, and ran it on my machine. I was a bit amazed at the disparity -- below are the scripts extracted from the post.
The following script using Numpy below took ~0.02s on my machine.
Surprisingly second one using BufferOutputStream is 2x slower than the first using mmap. I also tried replacing the path with /dev/shm/, which is actual memory map directory, which sped things up to 0.6s. It's as if create_memory_map isn't using memory mapping at all. In fact if you swap out
mmap = pa.create_memory_map(path, 5000000 * 1000)
with
mmap = pa.OSFile(path, 'wb')
you'll decrease the write time by half! What's causing this?
os Ubuntu 24
arrow 1.3.0
pyarrow 16.1.0
Component(s)
Python
The text was updated successfully, but these errors were encountered:
Describe the bug, including details regarding any error messages, version, and platform.
I was looking around the internet for why Arrow's IPC is essentially the speed of going to disk, and I came upon a post on stackoverflow from 2022, and ran it on my machine. I was a bit amazed at the disparity -- below are the scripts extracted from the post.
The following script using Numpy below took ~0.02s on my machine.
The script below using PyArrow ran for 0.8s on my machine.
Surprisingly second one using
BufferOutputStream
is 2x slower than the first using mmap. I also tried replacing the path with/dev/shm/
, which is actual memory map directory, which sped things up to 0.6s. It's as ifcreate_memory_map
isn't using memory mapping at all. In fact if you swap outwith
you'll decrease the write time by half! What's causing this?
Component(s)
Python
The text was updated successfully, but these errors were encountered: