I work with video data, so I just ran these rough benchmarks on my MacBook Pro:
import cPickle as pickle # yes, I'm on Python 2.7. Sue me.
import numpy as np
a = np.random.rand(800, 600, 3) # 800x600 px, RGB channel
%timeit pickle.dumps(a) // %timeit magic from IPython
1 loops, best of 3: 855 ms per loop
It takes nearly a second to serialize a not-so-huge `numpy` array, which makes it very difficult to do any sort of soft real-time analysis.This is a huge pain, and (very sadly for this Python aficionado) suggests that Python might be the wrong language for this kind of work.
Any suggestions?