Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: hash() yields different results for different platforms

Reply
Thread Tools

RE: hash() yields different results for different platforms

 
 
Kerry, Richard
Guest
Posts: n/a
 
      07-12-2006

The hash is not expected to be unique, it just provides a starting point
for another search (usually linear ?).

See http://en.wikipedia.org/wiki/Hash_function


Helpfully,
Maybe,
Richard.




-----Original Message-----
From: python-list-bounces+richard.kerry=(E-Mail Removed)
[mailtoython-list-bounces+richard.kerry=(E-Mail Removed)] On
Behalf Of Piet van Oostrum
Sent: 12 July 2006 10:56
To: http://www.velocityreviews.com/forums/(E-Mail Removed)
Subject: Re: hash() yields different results for different platforms

>>>>> Grant Edwards <(E-Mail Removed)> (GE) wrote:


>GE> The low 32 bits match, so perhaps you should just use that
>GE> portion of the returned hash?


If the hashed should be unique, 32 bits is much too low if you have
millions of entries.
--
Piet van Oostrum <(E-Mail Removed)>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: (E-Mail Removed)
--
http://mail.python.org/mailman/listinfo/python-list
 
Reply With Quote
 
 
 
 
Paul Rubin
Guest
Posts: n/a
 
      07-12-2006
"Kerry, Richard" <(E-Mail Removed)> writes:
> The hash is not expected to be unique, it just provides a starting point
> for another search (usually linear ?).


The database is good at organizing indexes and searching in them. Why
not let the database do what it's good at.
 
Reply With Quote
 
 
 
 
Piet van Oostrum
Guest
Posts: n/a
 
      07-13-2006
>>>>> "Kerry, Richard" <(E-Mail Removed)> (KR) wrote:

>KR> The hash is not expected to be unique, it just provides a starting point
>KR> for another search (usually linear ?).


>KR> See http://en.wikipedia.org/wiki/Hash_function


That only contains a definition of a hash function. I know what a hash
function is. But the OP wanted to use the hash as a unique key.
--
Piet van Oostrum <(E-Mail Removed)>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: (E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Floats to Strings yields erratic results Dirk T. Shelley C Programming 29 06-10-2011 10:49 PM
hash() yields different results for different platforms Qiangning Hong Python 12 07-12-2006 02:08 PM
Problem with method that starts process, yields pid then yields return code x1 Ruby 11 12-06-2005 01:30 AM
double to int conversion yields strange results =?ISO-8859-1?Q?Bj=F8rn_Augestad?= C Programming 31 02-16-2005 08:39 PM
File System Search on an asp file yields not results Rafael Nenninger ASP General 2 11-01-2004 10:05 PM



Advertisments