Re: Search Algorithm

From: Sergio Basurto Juarez (sbasurtoj_at_yahoo.com)
Date: 11/15/04

  • Next message: Matt Price: "automatic printer recognition"
    Date: Mon, 15 Nov 2004 12:09:30 -0800 (PST)
    To: Debian-User <debian-user@lists.debian.org>
    
    

    --- Ron Johnson <ron.l.johnson@cox.net> wrote:

    > On Mon, 2004-11-15 at 10:25 -0800, Sergio Basurto
    > Juarez wrote:
    > > First of all, I want to leave clear that I know
    > that
    > > the question that I am asking for, does not have
    > to do
    > > with this list, but I dare to ask this question
    > here
    > > because I am sure that here are a lot of good
    > > programming and scientisitics guys and may be one
    > of
    > > you can help me.
    > >
    > > I am programming a function to search in an array,
    > I
    > > know there is the binarysearch algorithm, an other
    > > good methods to search, but I want something that
    > does
    > > not take to long.
    >
    > If the data points are ordered, a binary search is
    > pretty darned
    > fast. And a simple algorithm, too. Unless you need
    > to wring the
    > last nanosecond of speed from your app, a good,
    > simple algorithm
    > is better than a slightly better complicated
    > algorithm.
    >
    > For an array of 8240 elements, you'd need a max of
    > (dredging up
    > college class...) log2(16384) ( = 14) memory
    > accesses.
    >
    First of all thanks for the note, I think I will use a
    Hashing Table as some one suggest here, becuase in
    this case seems to be more suitable for the problem,
    why am so worry about speed, is becuase is a web
    application in php, and it takes to long with the
    binarysearch algorithm, nevertheless I am testing the
    same with Hashing Tables and it suits to what I am
    looking in time consuming.

    Also I was wondering if there were some magic equation
    that do the trick without hashing tables, but I think
    the time that will take me to find some one is too
    much so I will use hashing tables meanwhile.

    Thanks again.

    =====

    --
    Sergio Basurto J.
    If I have seen further it is by standing on the 
    shoulders of giants. (Isaac Newton)
    --
    		
    __________________________________ 
    Do you Yahoo!? 
    The all-new My Yahoo! - Get yours free! 
    http://my.yahoo.com 
     
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Matt Price: "automatic printer recognition"

    Relevant Pages

    • Hashing
      ... particular domain due to inherited capacity to avoid hashing collisions ... would be suitable for authentication (where rare occurances of collisions ... algorithm to avoid collisions within the domain is extremely important. ... '_' characters only), with token length no larger than 32 characters. ...
      (alt.lang.asm)
    • [Full-disclosure] Re: choice-point screw-up and secure hashes
      ... > discover your salting algorithm directly). ... a keyed hashing algorithm would be great. ... encryption won't solve the problem. ... help protect the data in transit, it would help protect the data from ...
      (Full-Disclosure)
    • Re: Search Algorithm
      ... >> same with Hashing Tables and it suits to what I am ... If you need fast search times then why use ... > In this case I would suggest a different language. ... > algorithm itself but rather the language. ...
      (Debian-User)
    • Re: Search Algorithm
      ... > same with Hashing Tables and it suits to what I am ... be using some tree structure if you really want efficient search times. ... In this case I would suggest a different language. ... algorithm itself but rather the language. ...
      (Debian-User)
    • Re: Search Algorithm
      ... > I am programming a function to search in an array, ... > know there is the binarysearch algorithm, ... And a simple algorithm, too. ... For an array of 8240 elements, you'd need a max of (dredging up ...
      (Debian-User)