CppCon 2016: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"
CppCon1 HN recommender · recommended in 1 month, 2016–2021
talk · advanced · evergreen · 2016–2021 on HN
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.
Up next
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
15 HN recommender · 2017–2025
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNPreventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)
DevGAMM
14 HN recommender · 2020–2025
10 mo on HN"Performance Matters" by Emery Berger
Strange Loop Conference
12 HN recommender · 2019–2025
11 mo on HNThe Thirty Million Line Problem
Molly Rocket
11 HN recommender · 2018–2024
10 mo on HNCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
9 HN recommender · 2018–2026
10 mo on HNErlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp
Erlang Solutions
6 HN recommender · 2014–2022
9 mo on HNHow Crash Bandicoot Hacked The Original Playstation | War Stories | Ars Technica
Ars Technica
13 HN recommender · 2020–2026
9 mo on HN"How NOT to Measure Latency" by Gil Tene
Strange Loop Conference
9 HN recommender · 2015–2026
10 mo on HNRefterm Lecture Part 1 - Philosophies of Optimization
Molly Rocket
10 HN recommender · 2021–2026
9 mo on HNCppCon 2014: Mike Acton "Data-Oriented Design and C++"
CppCon
9 HN recommender · 2015–2026
8 mo on HNJonathan Blow - Preventing the Collapse of Civilization (English only)
bus
11 HN recommender · 2019–2023
3 comments from Hacker News
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.
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
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