[SciPy-dev] huge speed regression in loadmat from 0.6.0 to 0.7.0

Nathaniel Smith njs@pobox....
Wed Feb 11 20:05:00 CST 2009

On Wed, Feb 11, 2009 at 12:40 PM, Ryan May <rmay31@gmail.com> wrote:
> Anyhow, for anyone who cares, here's a patch that removes the
> braindeaded-ness and should actually work.

It doesn't for me -- seems to have an infinite loop or somesuch (I got
bored after half an hour).

I redid the patch a bit (fixed the loop condition, and renamed some
variables for clarity), and my version (attached, against stock 0.7.0)
does terminate, and is almost as fast as 0.6.0:

$ time python -c 'import scipy.io; scipy.io.loadmat("test.mat")'
real    0m5.020s
user    0m3.480s
sys     0m1.540s

So now the GzipInputStream overhead is only about 20-25%. Still seems
a bit higher than it should be, but certainly usable, and worth it for
the memory win.

BTW, the name GzipInputStream is very confusing for something that
reads raw deflate format and not, say, gzip format :-).

-- Nathaniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scipy-gzipstreams.patch
Type: text/x-diff
Size: 1774 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20090211/3e22dd47/attachment.bin 

More information about the Scipy-dev mailing list