Good videos, with context.
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"

CppCon
7 HN recommenders · discussed 2014–2024
Open YouTube ↗

About this video

Chandler Carruth's CppCon 2014 talk on writing fast C++, explaining why data structure choice and memory layout matter more than clever algorithms. It covers why standard containers like unordered_map perform poorly on modern CPUs.

Why it appears in the archive

A perennial recommendation for anyone learning performance optimization, cited whenever hash tables, cache behavior or STL containers come up.

AI-generated summary and labels from the source dataset; verify important details against the video. Source & credits.

From the Hacker News discussion

amaks · 2014-12 · strong rec

There are many things in the standard C++ library which are named incorrectly (std::string), awkwardly (std::unordered_map) and and implemented inefficiently from the perspective of modern CPUs (same std::unordered_map, which uses linked list for the underlying hash table buckets). See the great talk on CppCon 2014 about those issues - [VIDEO] .

Read original comment ↗
slavik81 · 2024-03 · strong rec

Strongly agree. That's perhaps less true for the software I work on these days (lapack), but I've seen that so many times over my career. I'm also a big fan of "Efficiency with Algorithms, Performance with Data Structures" by Chandler Carruth at CppCon 2014. [VIDEO]

Read original comment ↗
yoklov · 2015-02 · rec

Chandler Carruth's CPPCon talk [0] this year was also great (surprisingly, as I had a fairly low opinion of most of the others). It wasn't better than Mike Acton's [1], but I suspect that it was more actionable for most devs. [0] [VIDEO] [1] [LINK]

Read original comment ↗
sanderjd · 2015-08 · rec

Also, those allocations imply linked, rather than contiguous, data structures, which (often? always?) imply poor cache interaction, which is a major source of inefficiency. Would love some more perspectives on this, as I've just watched a couple cppcon talks ([0], [1]) and I'm feeling a bit drunk on the kool-aid. [0]: [VIDEO] [1]: [LINK]

Read original comment ↗
humanrebar · 2016-05 · rec

Here's a few: - "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!" [LINK] - "Understanding Compiler Optimization" [LINK] - "Optimizing the Emergent Structures of C++" [LINK] - "Efficiency with Algorithms" [VIDEO] The first one is really good if you've never benchmarked anything in a Linux environment. Or if you otherwise want to learn how to investigate how C++ gets turned into machine code.

Read original comment ↗
amaks · 2016-05 · rec

STL is not inherently slow per se, some data structures are just not fast on modern CPUs, so they have to be chosen wisely. Here is good talk: [VIDEO] .

Read original comment ↗
adrianN · 2017-06 · rec

Yes, if you write performance sensitive code you have to be very careful with dictionaries. See for example this nice talk by Chandler Carruth [VIDEO]

Read original comment ↗
alexhutcheson · 2020-09 · rec

If you haven't already seen it, you'd probably really enjoy Chandler Carruth's "Efficiency with Algorithms, Performance with Data Structures" talk from CppCon 2014: [VIDEO]

Read original comment ↗