Efficient checksum calculating on lagre files

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Tue Feb 8 13:40:47 EST 2005


On Tue, 8 Feb 2005 17:26:07 +0100, rumours say that "Fredrik Lundh"
<fredrik at pythonware.com> might have written:

>on my machine, Python's md5+mmap is a little bit faster than
>subprocess+md5sum:
>
>    import os, md5, mmap
>
>    file = open(fn, "r+")
[snip]

My first reaction was that "r+" should be "r+b"... but then one presumes that an
mmap'ed file does not care about stdio text-binary conventions (on platforms
that matters).
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list