Re: Which data structure should Iuse for fast retrieval(KS)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: YKUT (ykutanoor2003_at_yahoo.com)
Date: 04/16/04


Date: 16 Apr 2004 03:55:13 -0700

Hi KS,

Thnx for the response.
> store data using an index, use an array. If you really need to look up
> something by a key, then this won't work.
I have used CMapStringToString where I have to map a string to another string.
Theres a function called lookUp THAT will be returning the string if given the key.

I want TO KNOW how different CMapStringToString is from Cache Memory.
BCOZ I am reading from the file in read mode and storing all the contents in
CMapStringToString.
Or Do I have to write anotehr programto cache it.

Pls clarify

"KS" <ks@blah.com> wrote in message news:<eEPn1lvIEHA.2924@TK2MSFTNGP09.phx.gbl>...
> None of them. All of them are horrible if you have huge amounts of data.
> Without knowing what you want to do with the data or how much data you're
> going to have, it's tough to tell you which one to use. If you just want to
> store data using an index, use an array. If you really need to look up
> something by a key, then this won't work.
>
> CMyData* myData = new CMyData[count];
>
> [ ... do your processing here ... ]
>
> delete[] myData;
>
> KS
>
> "YKUT" <ykutanoor2003@yahoo.com> wrote in message
> news:e75a53c8.0404142055.76afcaf2@posting.google.com...
> > Hi,
> > Which is the most preffered & fastest way of retrievals /searching
> > mechanism wrt Data stuctutes/hash tables ?
> >
> > Is CList,CMap,CMapString ?
> >
> > Pls clarify as I am doing frequent searches in a file.My idea is read
> > from this file and dump this in to one data structure.
> >
> > Pls guide.
> >
> > Regards
> > YKUT



Relevant Pages

  • Implementation question
    ... For an application I'm developing I need to store data from a file in a ... The data itself can be real or string or a combination of the both. ... I would like to make available to libraries, ... I first had in mind of using an "array of array of string", ...
    (comp.lang.pascal.delphi.misc)
  • Re: dereferencing or not?
    ... No, a vector in a space of dimension 1 indeed has only one coordinate, ... but an array of dimension 1 has one length L which is the ... And you can naturally use an array to store a string ... (or to store data that might not be a string). ...
    (comp.unix.programmer)
  • Re: String and Character Array...
    ... String or Character Array.in c. ... of the array is not dependent on its contents. ... (or to store data that might not be a string). ...
    (comp.lang.c)
  • Help in French|Spanish|German translation.
    ... I am also an author of User-defined string functions. ... WORDTRANEX (cSearched, cArExpressionSought | cExpressionSough, ... each string of the array is searched ... If the parameter nArStartOccurrence is -1 or omitted, the replacement starts ...
    (microsoft.public.fox.helpwanted)
  • Re: passing a string to a dll
    ... Joe, I really appreciate you taking the time to demonstrate this. ... sure how I would implement indexing it for random alphanumeric codes. ... I might handle the array. ... I actually have been wondering if I could use a second string ...
    (microsoft.public.vc.mfc)