CppCon 2015: Andrei Alexandrescu “std::allocator...”

Channel:CppCon · Length:1:12:27 · Published:2015-10-13 · Views:196829

Watch on YouTube

Summary

Andrei Alexandrescu's CppCon 2015 talk argues that std::allocator is badly designed. He proposes building high-performance allocators from small composable, templated pieces.

Why HN recommends it

HN repeatedly recommends it as an entertaining, mind-opening talk on allocator design and composable generic programming.

It really opened my eyes to how one could very elegantly make a very complex and high-performance heap allocator — HN, 2025

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

Subtitles (excerpt)

let's start so we start early because we're going to finish late so that's the right thing to do well um I sent this working title to a number of folks and ask what what do I mean by this title and it was kind of difficult to so I had to explain my title so my my title means okay here's my working title I had this working title which was the okay and then I thought it's not a very good title because you could make an allegation about an alligator for this alligator caught my foot it it ate my Crocs right so there is a possibility of a connection there um what I'm saying there's not a lot of connection between St allocator and memory allocation this is my point and and to it my uh another working title of mine was design allocators that don't not work so you know being a program so this is not English it's not correct but it's sort of logic logically correct because you can imagine as a program you put a parenthesis around not work and that's like a verb not work like not work is a verb and you put a parenthesis and it makes sense so it's Mak it's I I love grammatical malice that way in any language as it were anywh who uh I hope uh it's okay so does this is does this make clear that I'm not here

On Hacker News

> The issue with this approach is that the more you can control, the less the compiler can assume. That's absolutely true, but there's a workaround, albeit a complicated one. The compiler internals need the same kind of constraints or traits that abstract code such as language interfaces or template parameters can have. These can then be used to constrain the internals in a way that then would al… — jiggawatts, 2025-01
Not exactly a lecture series, but Andrei Alexandrescu has had some fantastic keynote presentations at CppCon. I don't even program in C++ any more, but I've watched these more than once, they're entertaining, approachable, and inspiring: Speed Is Found In The Minds of People [LINK] std::allocator Is to Allocation what std::vector Is to Vexation [VIDEO] An actual lecture series I've enjoyed watchi… — jiggawatts, 2023-01
Every time I hear someone talking about writing a memory allocator, it always reminds me of the brilliant CppCon 2015 talk by Andrei Alexandrescu about how he wrote an modular allocator library that can be built up in pieces to make whatever you like. [VIDEO] — jiggawatts, 2020-12
Andrei Alexandrescu's 2015 talk about C++'s allocators is great. He's a very entertaining presenter, and he makes case for extremely composable templated allocators (and why std::allocator isn't that). [VIDEO] — favorited, 2020-10
A bit unrelated, but if anyone is interested, I recently watched Andrei Alexandrescu's 2015 talk about a composable allocator design in C++ and it was really interesting. And Andrei's presentation style was fantastic, per usual. Note that this talk is about a std::allocator-like type, potentially on top of one of malloc/jemalloc/etc. [VIDEO] — favorited, 2020-04

Related videos