[SciPy-user] loadmat speed - structs and cells

Robin robince at gmail.com
Tue Apr 28 05:46:04 EDT 2009


Hi,

I recently had some colleagues starting to use NumPy/SciPy and they
ran into a problem with performance loading some of their matlab
files.

It is a small 1MB file, but contains lots of nested structs and cell
arrays... it takes a second or so to open in matlab, but python was
taking 4 minutes +. I thought it might be related to the problem
previously discussed, and after upgrading to SVN there was a big
improvement - it now takes 40s on my machine, but this is still an
order of magnitude slower than matlab.

Since the previous problem was observed with a file that was too large
for testing I thought this 1MB file might be more useful to use as a
test against regressions and maybe even an example to help optimising.

It can be found here:
http://www.robince.net/robince/structs_cells.mat

Please let me know if there is anything else for them to try to get a
speed up (I suggested trying to save in different formats - but I
don't really know if v5 vs v6 etc. is likely to make a difference to
loading).

Cheers

Robin



More information about the SciPy-User mailing list