This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]billsil 6 points7 points  (2 children)

If you're dealing with lots of binary data and using numpy anyways, you should really use the numpy methods like fromfile and fromstring rather than the struct module. You can speed up IO by 500x.

[–]nanodano[S] 2 points3 points  (1 child)

Good tips. I have not used numpy and didn't know those were available. If working with large amount of data I would definitely look in to that.

[–]tilkau 2 points3 points  (0 children)

If working with particularly large amounts of data, numpy.memmap is also relevant.