Martin Pool's blog

python - 70MB/s

I did a simple test the other night of how fast Python can read/write data. A simple 'cat' in Python can pump data through at about 70MB/s on a Pentium M laptop. This is just with simple read() and write() into strings, without any special tricks. By contrast bzip2 on that machine is only about 300kB/s.

That's probably pretty slow compared to C, but faster than most network connections could sustain. It's an interesting data point for writing moderate-performance software in Python.

(Doing a lot of manipulation might well slow it down.)

Archives 2008: Apr Feb 2007: Jul May Feb Jan 2006: Dec Nov Oct Sep Aug Jul Jun Jan 2005: Sep Aug Jul Jun May Apr Mar Feb Jan 2004: Dec Nov Oct Sep Aug Jul Jun May Apr Mar Feb Jan 2003: Dec Nov Oct Sep Aug Jul Jun May