Skip to content
0:00 / 0:00

#c++#vector#linked-list

Modern C++: What You Need to Know

aghuttun

4.2K subscribers • 6 videos on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Herb Sutter

Intermediate. Assumes working knowledge.

104K views12 years ago1 recommendation

Programming languagesSystems programmingC++Performance and optimization

Herb Sutter discusses the state of modern C++ and explains why vectors outperform linked lists for most container sizes.

This talk will give an update on recent progress and near-future directions for C++, both at Microsoft and across the industry. This is a great introduction to the current state of the language, including a glimpse into the future of general purpose, performance-intensive, power-friendly, powerful native programming.

Why it's here

1 person recommends this

What people say. Recommended for its research-backed explanation of why vectors should be the default dynamic container over linked lists.

Moments people linked to

simonon Stack Overflow • Recommends

On “Linked List vs Vector”

I don't like the number one answer here so I figured I'd share some actual research into this conducted by Herb Sutter from Microsoft. The results of the test was with up to 100k items in a container, but also claimed that it would continue to out perform a linked list at even half a million entities. Unless you plan on your container having millions of entities, your default container for a dynamic container should be the vector. I summarized more or less what he says, but will also link the reference at the bottom: "Even if you preallocate the nodes within a linked list, that gives you half the performance back, but it's still worse than a vector. Why? First of all it's more space --…
8View the answer