AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2007.07.24 07:16 "[Tiff] TIFFShiftArrayOfLong", by Oliver Geisen
2007.07.24 09:30 "Re: [Tiff] TIFFShiftArrayOfLong", by Andrey Kiselev
2007.07.27 07:22 "Re: [Tiff] TIFFShiftArrayOfLong", by Oliver Geisen
2007.07.28 19:15 "Re: [Tiff] TIFFShiftArrayOfLong", by Oliver Geisen
2007.07.29 19:40 "Re: [Tiff] TIFFShiftArrayOfLong", by Toby Thain

2007.07.29 19:40 "Re: [Tiff] TIFFShiftArrayOfLong", by Toby Thain

On 28-Jul-07, at 4:15 PM, Oliver Geisen wrote:

Ross,

> Shifting more than 7 bits *does* makes sense; shifting an array by > 24 bits is the same as shifting the array by three bytes. It is

>> not the same as not shifting at all.

Shifting by 24 bits is equal to move three bytes and for moving you don't need bit-manipulation (which is slow by design).

Depending on architecture, shifting a long by 8 bits may well be faster than four byte load/stores.

--Toby

For me, bit-shifting applies to smaller than 8 bit data only, because everything else could be made with byte (or more) moves.

olifax...

> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/