summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-01-31 15:28:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-01-31 15:28:40 (GMT)
commit6cf56ca817ccba7b8c956cffee208ec624921b12 (patch)
treee30ab953bdfc4d332ea6c0af192f8ae4893931b3 /src/H5Tconv.c
parenteb4cc0556c390deaa9f21710d95f5690932221d9 (diff)
downloadhdf5-6cf56ca817ccba7b8c956cffee208ec624921b12.zip
hdf5-6cf56ca817ccba7b8c956cffee208ec624921b12.tar.gz
hdf5-6cf56ca817ccba7b8c956cffee208ec624921b12.tar.bz2
[svn-r8136] Purpose:
Optimization Description: Speed up various parts of the library by setting a global variable for the endianness of the machine at library startup and use that variable instead of repeatedly querying the endianness of the native int datatype. Platforms tested: IBM p690 (copper) too minor to require h5committest
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 7c7b505..862c19a 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -683,15 +683,9 @@ H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/* Check for "no op" reference conversion */
if(src->type==H5T_REFERENCE) {
- H5T_t *native_int; /* Native integer datatype */
-
/* Sanity check */
assert(dst->type==H5T_REFERENCE);
- /* Get pointer to native integer type */
- if (NULL==(native_int=H5I_object(H5T_NATIVE_INT_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a datatype object");
-
/* Check if we are on a little-endian machine (the order that
* the addresses in the file must be) and just get out now, there
* is no need to convert the object reference. Yes, this is
@@ -701,7 +695,7 @@ H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* "native" hobj_ref_t datatype and I think that would break a
* lot of existing programs. -QAK
*/
- if(native_int->u.atomic.order == H5T_ORDER_LE)
+ if(H5T_native_order_g == H5T_ORDER_LE)
break;
} /* end if */