Endianness (was Re: XSTRETCH and Library Lessons) [message #48461] |
Mon, 24 April 2006 09:30 |
news.verizon.net
Messages: 47 Registered: August 2003
|
Member |
|
|
> However, by using the /SWAP_IF_LITTLE_ENDIAN keyword to OPENR(W) this
> can all be done transparently, and this "on the fly" byteswapping can
> improve the speed by a factor of two for large arrays on my Linux box.
Well, it turns out that most of this speed advantage is due my use of
old keywords to BYTEORDER. when I was swapping bytes in I/O.
Apparently,
BYTEORDER, data, /LSWAP, /SWAP_IF_LITTLE
is exactly equivalent to
BYTEORDER, data, /FTOXDR
for floating point data except the former is at least twice as fast.
So I can get most of the speed advantage by updating the I/O routines
without worrying about introducing incompatibilities with old versions.
(I could also just use the V5.6 SWAP_ENDIAN_INPLACE function,
although I currently want to support versions V5.4 and later).
--Wayne
|
|
|