Testing h5py boolean vs uint8 write speed

When testing why nidaqmx-python was taking so long to read data and write to HDF5, I naturally benchmarked h5py boolean write speed.

h5py boolean write speed results

dtype write time [sec]
ndarray bool 6.6e-4
list of bool > Numpy uint8 3.2e-2
list of bool 1.7e-2

So the big penalty in writing boolean arrays from lists to HDF5 via h5py is the conversion from list to Numpy array implicit in writing with h5py.

I determined that the order 10 ms h5py boolean list/array write time was not the issue, rather it was the synchronous reading of digital IO that was jamming up the system.

Leave a Comment