Last active
July 12, 2023 09:34
-
-
Save rossant/7b4704e8caeb8f173084 to your computer and use it in GitHub Desktop.
Quick HDF5 benchmark
@andrewcollette thanks for your comment, I've updated the benchmarks and the post accordingly. And thanks for doing h5py! Despite the problems we've had with HDF5, I actually like the h5py API and how it fits so naturally with NumPy.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@rossant, a big part of this is that the fancy-indexing code in h5py uses a naive algorithm based on repeated hyperslab selection, which is quadratic in the number of indices. It was designed/tested for small numbers of indices.
The particular example you have here (0 to 10000 in steps of 10) can be mapped to slices (although of course this is not generally true). In this case the results are:
This is a great argument to improve the implementation of fancy indexing in h5py, but I would hesitate to conclude "HDF5 is slow".