HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"

CppCon1 HN recommender · recommended in 1 month, 2016-2021
YouTube
119K views · 10 years ago · talk · evergreen

Chandler Carruth's CppCon 2016 talk on designing hybrid data structures for performance. He covers cache locality, working-set size and allocation overhead, and why standard C++ containers fall short.

Cited as the source for criticism of std::deque and move-constructor pitfalls, and as motivation to write custom data structures.

Software performance & optimizationC, C++, Rust, Go & systems languagesAlgorithms & data structures#chandlercarruth#cppcon#performance#cachelocality#stl

3 comments from Hacker News

@typon2021 · in “EASTL: An Alternative C++ Standard Library”

I suggest watching this talk: ▶ this video Or pretty much any other by Chandler to understand why the STL sucks and why you should write better datastructures for your own use cases.

RecommendsView on HN
@040919482020 · in “Comparison of C++17, Go, and Java for a next-generation sequencing tool”

in CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"[1] he says: "but the standard deque data type is really quite bad. I wouldn't recommend anyone use it for anything. if you look at the implementation constraints, the constraints placed upon its iterators, and its invalidation constraints, it's painted into a very unpleasant corner and it has very few opportunities to be an efficient data structure." [1] ▶ this video

CitesView on HN
@chubot2016 · in “Help me sort out the meaning of “{}” as a constructor argument”

The parent was asking the goldilocks question -- was there ever a point where C++ was not too complex like modern C++, e.g. this {} issue, but had enough features (contrast with C, which doesn't have enough features for many applications). I don't think there was such a moment. Apparently move constructors were a de-optimization in the case of std::vector. As far as I remember, it's related to iterator invalidation and move semantics making small-size optimization impossible (e.g. inlining small vectors into the object itself rather than having another pointer and heap allocation). I'm pretty sure it's in this video: ▶ this video Although it's debatable how big a deal this is, it's a good example of the point. People like "C with classes" because they can read the source and kind of figure out what code is generated. They can reason about locality. Although I don't consider myself an expert C++ programmer, if I can't reason about the consequences of move constructors on std::vector, which is a fundamental and relatively simple data structure, then the language is already getting into "surprising" territory. I would have never figured out that de-optimization unless I heard it in a video. On a related note, I wish that return value optimization had better syntax -- that would make move semantics unnecessary in a lot of cases. On the other hand, reasoning about the generated code is already a lost cause because assembly code is so complicated now. We now have to live in a world wher

CitesView on HN
CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"1:13:41

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

CppCon
235K views • 12 years ago
CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"1:29:54

CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!"

CppCon
188K views • 11 years ago
CppCon 2017: Chandler Carruth “Going Nowhere Faster”1:00:58

CppCon 2017: Chandler Carruth “Going Nowhere Faster”

CppCon
113K views • 9 years ago
2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++1:33:02

2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++

CppNow
34K views • 13 years ago
CppCon 2014: Mike Acton "Data-Oriented Design and C++"1:27:46

CppCon 2014: Mike Acton "Data-Oriented Design and C++"

CppCon
862K views • 12 years ago
CppCon 2015: Sean Parent "Better Code: Data Structures"1:04:00

CppCon 2015: Sean Parent "Better Code: Data Structures"

CppCon
106K views • 11 years ago
CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”1:04:26

CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”

CppCon
40K views • 8 years ago
CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”59:53

CppCon 2019: Chandler Carruth “There Are No Zero-cost Abstractions”

CppCon
147K views • 7 years ago
CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."57:39

CppCon 2016: Chandler Carruth “Garbage In, Garbage Out: Arguing about Undefined Behavior..."

CppCon
94K views • 10 years ago
Plenary: Performance Matters - Emery Berger - CppCon 20201:01:09

Plenary: Performance Matters - Emery Berger - CppCon 2020

CppCon
32K views • 6 years ago
CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”55:42

CppCon 2019: Matt Godbolt “Path Tracing Three Ways: A Study of C++ Style”

CppCon
77K views • 7 years ago
Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 20231:35:12

Modernizing Compiler Design for Carbon Toolchain - Chandler Carruth - CppNow 2023

CppNow
71K views • 3 years ago
CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”1:39:25

CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”

CppCon
149K views • 10 years ago
CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory”36:10

CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory”

CppCon
15K views • 7 years ago
CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”1:19:52

CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”

CppCon
264K views • 10 years ago
CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”59:34

CppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”

CppCon
137K views • 9 years ago
CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”1:00:07

CppCon 2017: Carl Cook “When a Microsecond Is an Eternity: High Performance Trading Systems in C++”

CppCon
357K views • 9 years ago
CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"31:19

CppCon 2016: Nicholas Ormrod “The strange details of std::string at Facebook"

CppCon
122K views • 10 years ago
CppCon 2017: Juan Pedro Bolivar Puente “Postmodern immutable data structures”1:06:00

CppCon 2017: Juan Pedro Bolivar Puente “Postmodern immutable data structures”

CppCon
31K views • 9 years ago
CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced.  What do they really do?”1:14:22

CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”

CppCon
288K views • 9 years ago