LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-02-2007, 05:04 AM   #1
Sunilsbjoshi
LQ Newbie
 
Registered: Feb 2005
Posts: 14

Rep: Reputation: 0
Arrow Address hashing techniques


Hi,

I am in search of few good hashing functions. The input key will be the address of the variable, based on that the hashing needs to be performed. My hash tabel size will be static say 64.

One technique I know currently is :http://www.concentric.net/~Ttwang/tech/addrhash.htm


Can you share any more better or available techniques.


Thanks
 
Old 12-02-2007, 11:58 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Since addresses of distinct variables are already unique, what do you gain by accessing the variables via a hash lookup? Am I missing something here, or is this a purely academic exercise (homework)?
--- rod.
 
Old 12-02-2007, 01:55 PM   #3
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Quote:
Originally Posted by theNbomr View Post
Since addresses of distinct variables are already unique, what do you gain by accessing the variables via a hash lookup? Am I missing something here, or is this a purely academic exercise (homework)?
--- rod.
A 32 bit address can index up 4 billion unique elements. He is probably only hashing a few hundred to a few thousand entries, so he wants a function that will give a good hash of a 32 bit integer.

If you search google, you'll get a bunch. Just choose one that looks good to you. You can try a few and see which one gives you less collisions. Addresses won't be random, they'll probably bunch up together, so you may have to be careful.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dc++ client with tth hashing EmOuBi Linux - Software 3 11-30-2008 07:47 PM
Help with cpp + tokenize + hashing kshkid Programming 2 12-29-2006 08:06 AM
Hashing using Divison Problem ckoniecny Programming 2 11-03-2006 08:49 PM
linux password hashing indienick Programming 5 05-18-2006 02:12 PM
Linux and MD5 hashing GAVollink Programming 0 06-04-2003 01:12 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration