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

Channel:CppCon · Length:1:13:41 · Published:2014-10-21 · Views:235338

Watch on YouTube

Summary

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 HN recommends it

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

I'm also a big fan of "Efficiency with Algorithms, Performance with Data Structures" by Chandler Carruth at CppCon 2014. — HN, 2024

C, C++, Rust, Go & systems languages · Software performance & optimization · Algorithms & data structures

Subtitles (excerpt)

so hi there everyone my name is Chandler kth I work for Google um I work on our C++ language platform I work on our C++ compilers uh specifically I lead the clang and lvm teams at Google and I'm here to talk to you a little bit about performance and efficiency and making code fast and all the different things that go into that um but before I do too much I want to actually give you guys a little bit of a uh I want to manage some expectations because I've been reading the Twitter feed from all these folks they're talking about all these like crazy good questions um I just want you guys to know this is essentially like my view of what performance 101 should be okay so this is going to be kind of an intro talk if you guys are like hardcore like really deep performance nuts you may be a little bit bored and and and please be kind because I'm going to gloss over some things you could you could you could Heckle me thoroughly if you really want to so we're going to talk about efficiency performance algorithms and data structures and the first thing we're going to do is we're not going to talk about them we're going to talk about why anyone cares about them how many folks here think that C++ you know is it's really important to have per like

On Hacker News

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] — slavik81, 2024-03
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] . — amaks, 2014-12
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] — alexhutcheson, 2020-09
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] — adrianN, 2017-06
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 cod… — humanrebar, 2016-05

Related videos