Re: hashlittle(), hashbig(), hashword() and endianness - Mailing list pgsql-patches

From Marko Kreen
Subject Re: hashlittle(), hashbig(), hashword() and endianness
Date
Msg-id e51f66da0711190626u6a9438eeu8111a2bbb0c3003b@mail.gmail.com
Whole thread Raw
In response to Re: hashlittle(), hashbig(), hashword() and endianness  (Alex Vinokur <alexvn@users.sourceforge.net>)
List pgsql-patches
On 11/16/07, Alex Vinokur <alexvn@users.sourceforge.net> wrote:
> I would like to use both hashlittle() and hashword() (or
> hashword_little) on little-endian and big-endian machine and to get
> identical hashValues.

Whats wrong with hashlittle()?  It does use the same optimized
reading on LE platform that hashword() does.  Or you could wrap
the read values with some int2le() macro that is NOP on LE cpu.
Although I suspect the performance wont be better than using
hashlittle() directly.

--
marko

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] fulltext parser strange behave
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] fulltext parser strange behave