std::list

Started by
7 comments, last by krakrazor 20 years, 2 months ago
How is std::list for making alot(maybe in the millions) of items... they are probably gonna be cut into alot of big lists which lead to the smaller ones... but how will it perform? and what should i use if not std::list? It''s gonna be used for industrial strength productions.
Advertisement
How it will perform (and what you would use instead) depend on how you''re going to use it. The statement you made is sufficiently vague that it''s impossible to judge what the best data structure(s) for the job would be.
I''m not quite shure about std::list, but at least I''ve used std::set in my job to store a lot of data (something above 100,000) and it seems to work quite good and fast, so I guess std::list is a good option too.
My site Jvitel.com
What SiCrane said.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
well i dont know what type of operations you need to do on the data but access time for any linked list is O(n). maps and sets have a much faster access time normaly around O(log N), depending how it is implemented.

Do you have a key value for the objects? if so then i''d suggest using the std::map or std::set
it''s gonna be a program which will load many many items and then it will do not so complicated operations on them like copieng, changing fields, and deleting fields.
it''s gonna be a program which will load many many items and then it will do not so complicated operations on them like copieng, changing fields, and deleting fields.
Aren''t hash tables much better alternatives for huge amounts of data?
quote:Original post by krakrazor
it''s gonna be a program which will load many many items and then it will do not so complicated operations on them like copieng, changing fields, and deleting fields.


Is it possible that you don''t need that many of them loaded *at a time*?

This topic is closed to new replies.

Advertisement