Re: hashlittle(), hashbig(), hashword() and endianness

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Alex Vinokur" <alexvn(at)users(dot)sourceforge(dot)net>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: hashlittle(), hashbig(), hashword() and endianness
Date: 2007-11-19 14:26:14
Message-ID: e51f66da0711190626u6a9438eeu8111a2bbb0c3003b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On 11/16/07, Alex Vinokur <alexvn(at)users(dot)sourceforge(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-11-19 15:58:34 Re: [HACKERS] fulltext parser strange behave
Previous Message Andrew Dunstan 2007-11-19 13:31:43 Re: [HACKERS] fulltext parser strange behave