Click here to Skip to main content
15,921,295 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: cfile question Pin
Christian Graus12-Jun-02 17:39
protectorChristian Graus12-Jun-02 17:39 
GeneralRe: cfile question Pin
Tim Smith12-Jun-02 15:48
Tim Smith12-Jun-02 15:48 
GeneralRe: cfile question Pin
jafrazee12-Jun-02 17:21
jafrazee12-Jun-02 17:21 
GeneralLocal IP address Pin
ed987112-Jun-02 12:13
ed987112-Jun-02 12:13 
GeneralRe: Local IP address Pin
JohnnyG12-Jun-02 13:31
JohnnyG12-Jun-02 13:31 
GeneralRe: Local IP address Pin
JohnnyG12-Jun-02 13:34
JohnnyG12-Jun-02 13:34 
Generalmap or list? You decide! Pin
moredip12-Jun-02 12:04
moredip12-Jun-02 12:04 
GeneralRe: map or list? You decide! Pin
12-Jun-02 12:13
suss12-Jun-02 12:13 
Objects will be accessed and removed pretty much at random.

This is a big point here. Straight lists perform very poorly on lookup. The list has to be searched sequentially to find the object.

However, for lists, insertions are very fast. So are removals. But when you compare them to maps, lists insert and removals probably are much faster at all.

IMHO, I see little reason to even bother with a list. Just given that you are doing random lookups, you really need something that is fast.

If available in your STL (i.e. STLPort), you might take a look at a hash map. Since your data set is remaining a constant size, you don't have to worry about the re-hash performance hit. As long as your ID's are well distributed, hash maps should perform very fast.

... IMHO Smile | :)
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:15
moredip12-Jun-02 12:15 
GeneralRe: map or list? You decide! Pin
Tim Smith12-Jun-02 12:25
Tim Smith12-Jun-02 12:25 
GeneralRe: map or list? You decide! Pin
moredip12-Jun-02 12:39
moredip12-Jun-02 12:39 
GeneralRe: map or list? You decide! Pin
Alexandru Savescu13-Jun-02 6:01
Alexandru Savescu13-Jun-02 6:01 
GeneralRe: map or list? You decide! Pin
soptest12-Jun-02 12:32
soptest12-Jun-02 12:32 
QuestionIs there a way to read a given sector on a harddrive? Pin
redeemer12-Jun-02 10:52
redeemer12-Jun-02 10:52 
AnswerRe: Is there a way to read a given sector on a harddrive? Pin
12-Jun-02 11:17
suss12-Jun-02 11:17 
Generaldetermination of file type Pin
12-Jun-02 10:29
suss12-Jun-02 10:29 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 10:48
redeemer12-Jun-02 10:48 
GeneralRe: determination of file type Pin
12-Jun-02 10:53
suss12-Jun-02 10:53 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:00
redeemer12-Jun-02 11:00 
GeneralRe: determination of file type Pin
12-Jun-02 11:05
suss12-Jun-02 11:05 
GeneralRe: determination of file type Pin
redeemer12-Jun-02 11:32
redeemer12-Jun-02 11:32 
GeneralRe: determination of file type Pin
Roger Wright12-Jun-02 13:25
professionalRoger Wright12-Jun-02 13:25 
GeneralRe: determination of file type Pin
Matt Gullett12-Jun-02 13:46
Matt Gullett12-Jun-02 13:46 
General10x Pin
12-Jun-02 14:07
suss12-Jun-02 14:07 
GeneralRe: determination of file type Pin
Nish Nishant12-Jun-02 14:31
sitebuilderNish Nishant12-Jun-02 14:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.