What is the quickest way to open attributes in a callback from
H5Aiterate2() ?
It would seem that in the callback function there is the option to
either call
H5Aopen_by_idx() or H5Aopen_by_name() .
Since the callback function receives an /H5A_info_t/ a|| <http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-OpenByIdx>s parameter, one might
expect that using its corder member to open the attribute by index would be
faster than going via another name lookup. However, our experiments it is
30x slower to go via the index than via the name.
Is this expected behavior? Are the alternatives?
Werner
···
--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Center for Computation & Technology at Louisiana State University (CCT/LSU)
2019 Digital Media Center, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362
On May 21, 2014, at 6:23 AM, Werner Benger <werner@cct.lsu.edu<mailto:werner@cct.lsu.edu>> wrote:
What is the quickest way to open attributes in a callback from H5Aiterate2() ?
It would seem that in the callback function there is the option to either call
H5Aopen_by_idx() or H5Aopen_by_name() .
Since the callback function receives an H5A_info_t a<http://www.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-OpenByIdx>s parameter, one might
expect that using its corder member to open the attribute by index would be
faster than going via another name lookup. However, our experiments it is
30x slower to go via the index than via the name.
Is this expected behavior? Are the alternatives?
Hmm, did you create the object with the "index the creation order info" flag as well as the "track the creation order info" flag?
now I create the objects with both flags, but our tests show that H5Aopen_by_idx() is still 2x slower than H5Aopen_by_name().
Well, at least that's a 15x improvement. Still, I wouldn't think that it should be 2x slower, since it's the same basic code. Can you write a short standalone C program that demonstrates the timing difference?
Quincey
···
On Jun 11, 2014, at 8:11 AM, Wolfgang Leimer <w.leimer@ahm.co.at> wrote:
lg
Wolfgang
On 2014-05-30 00:01, Quincey Koziol wrote:
Hi Werner,
On May 21, 2014, at 6:23 AM, Werner Benger <werner@cct.lsu.edu> wrote:
What is the quickest way to open attributes in a callback from
H5Aiterate2() ?
It would seem that in the callback function there is the option to
either call
H5Aopen_by_idx() or H5Aopen_by_name() .
Since the callback function receives an _H5A_info_t_ a [1]s
parameter, one might
expect that using its corder member to open the attribute by index
would be
faster than going via another name lookup. However, our experiments
it is
30x slower to go via the index than via the name.
Is this expected behavior? Are the alternatives?
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system. E-mail transmission cannot be
guaranteed to be secure or error-free as information could be intercepted,
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message, which arise as a result of e-mail
transmission. If verification is required please request a hard-copy
version.