Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group