quote:223ms to insert a node? Do you really think the STL could only insert 5 nodes per second on your computer?
He actually said 0. 223ms to insert a node. So that's about 4484 inserts a second.
Edited by - Zipster on November 4, 2001 2:20:03 AM
quote:223ms to insert a node? Do you really think the STL could only insert 5 nodes per second on your computer?
quote:Original post by Grib
The frustration that c_wraith feels is I think the fact that for most people the linked list is used as a general purpose expanding container. Not only is it in every data structures book, it''s the first data structure, and often the most advanced you learn in an intro programming course. stl::vector can handle 90% of the cases that a lot of people are writing thier own linked lists for. 90% of the remaining 10% are better with a stl::map.
quote:Original post by lunarss
What other containers would you use for dynamic data anyway?? You can''t make much use of an array because you''d continually need to resize it which is much less efficient than a simple node insertion. The bottom line is that if you don''t know your data management requirements, you need a dynamic data structure; enter the linked list.
quote:
I clocked, in release build insertion time for one int. Performance optimization was turned on for the build. The stl list clocked in at 13 milliseconds. My list clocked in at 3.