Hash functions


Closed Thread
Results 1 to 4 of 4

Thread: Hash functions

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Ioannis,

    I>>Does anyone have any experience with Hash Functions to code the unique iButton serial number into a memory address to find it then instantly?<<

    Ouch...Unless you can use a "function" to calculate your address directly, you are talking about time. Some Hashing routines use functions as such. The other Hash routines will probably require more time in calculating , then it would be to read the data and compare. How many items will you have?

    Can you store them in a ASCII logical order and do a Binary Search routine?
    This will limit your number of reads down. if you have 256 items (like in a table) you would find (worse case senario) 8 reads to have your value.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

    Default

    Thanks for the replies.

    Well a 20 MHz xtal is not the best since speeding up to 5 times is not enough. There will be an incresing number of keys and may reach up to 300 or 400. Imagine a PIC searching 400 6-8 byte numbers!!!

    The binary tree is a good option. Did not think about it.

    Thanks again.

    Ioannis

Similar Threads

  1. Hash function
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th September 2007, 11:09
  2. Functions in Pic Basic Pro
    By bumlife in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 4th April 2007, 22:59
  3. Subs and functions
    By bearpawz in forum PBP Wish List
    Replies: 0
    Last Post: - 27th December 2006, 07:38
  4. Replies: 2
    Last Post: - 13th December 2005, 01:11
  5. Functions
    By AndyP in forum PBP Wish List
    Replies: 4
    Last Post: - 6th May 2005, 13:00

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts