Manipulate Large Binary Files

Derek Martin code at
Wed Apr 2 16:28:41 EDT 2008

On Wed, Apr 02, 2008 at 02:09:45PM -0400, Derek Tracy wrote:
> Both are clocking in at the same time (1m 5sec for 2.6Gb), are there
> any ways I can optimize either solution?  

Buy faster disks?  How long do you expect it to take?  At 65s, you're
already reading/writing 2.6GB at a sustained transfer rate of about
42.6 MB/s.  That's nothing to sneeze at...  Your disks, and not your
program, are almost certainly the real bottleneck.  Unless you have
reason to believe your hardware should be significantly faster...

That said, due to normal I/O generally involving double-buffering, you
might be able to speed things up noticably by using Memory-Mapped I/O
(MMIO).  It depends on whether or not the implementation of the Python
things you're using already use MMIO under the hood, and whether or
not MMIO happens to be broken in your OS. :)

> Would turning off the read/write buff increase speed?


Derek D. Martin
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list