frejanordsiek / hdf5storage

Python package to read and write a wide range of Python types to/from HDF5 formatted files. Can read/write data to the HDF5 based Matlab v7.3 MAT files.
BSD 2-Clause "Simplified" License
83 stars 24 forks source link

avoid costly calls to __getitem__ #111

Closed danielhrisca closed 3 years ago

danielhrisca commented 3 years ago

This PR introduces a few local alias to speed up the code execution.

Current 0.1.x branch code

image

The PR code

image

frejanordsiek commented 3 years ago

I am going to look at this some more later, but on first glance it looks good. The first part, the changes in Marshallers.py, is pretty similar to changes I already made in the main branch a while ago. But those changes in utilities.py, I did not think of at the time. Those would also be useful in the main branch as well.

frejanordsiek commented 3 years ago

All of this is sound, though some of the names for the temp variables are off (group is used for a Dataset). I will use this PR with some edits to the naming. Thank you.

danielhrisca commented 3 years ago

All of this is sound, though some of the names for the temp variables are off (group is used for a Dataset). I will use this PR with some edits to the naming. Thank you.

Thanks for the work!