reading multiple irregularly spaced hyperslabs

I implemented the "union-all, then read" method, and it is indeed much faster
than the "read each hyperslab in a for loop" method. I am somewhat puzzled by
this, because I thought I had tested this on a smaller version of the problem
and found the opposite to be the case. Anyway, my read times are good now, and
I am happy with the results.

thanks much,

- --sep

[ Steven E. Pav {bikes/bitters/linux} nerd ]
[ a palindrome: optimal sized Nan rehearsing up mixes Sussex ]
[ a palindrome: impugn is Rae Hernandez Islam it Po ]

···

On Wed, 3 Mar 2010 15:06:56, Quincey Koziol wrote:

reads are somewhat slower than what I expected based on the performance for
a toy version of the problem. In my read algorithm, however, I am essentially
doing the following loop:

for each slab {
H5Sselect_hyperslab(space_id, H5S_SELECT_SET, start, stride, count, block)
  H5Dread( etc )
}

should I expect better performance if instead, I construct a union of
hyperslabs, then do the read, like so:

initialize the slab as empty?
for each slab {
H5Sselect_hyperslab(space_id, H5S_SELECT_OR, start, stride, count, block)
}
H5Dread( etc )

which method is preferred, and why?

  The latter will probably have somewhat better performance. However, it is much more important to align your hyperslabs with your chunk boundaries. If you can't align the hyperslabs & chunk boundaries, you should increase your chunk cache size to hold several chunks in memory.