CppCon 2017: John Lakos “Local ('Arena') Memory Allocators (part 1 of 2)”

  Рет қаралды 74,603

CppCon

CppCon

Күн бұрын

CppCon.org
-
Presentation Slides, PDFs, Source Code and other presenter materials are available at: github.com/CppCon/CppCon2017
-
Are allocators worth the trouble? What situations merit their use? How are they applied effectually? What’s the performance impact? This practical talk by large scale C++ expert Dr. John Lakos demonstrates that having allocators in your tool box may lead to orders of magnitude speed improvements.
The runtime implications of the physical location of allocated memory is often overlooked, even in the most performance critical code. In this talk, we will examine how the performance of systems can degrade when using `new`/`delete` and `std::allocator` . We will contrast these global allocators, which allocate memory globally for a system, with local allocators that each allocate memory for a proper subset of objects in the system. We will also demonstrate how local allocators can reduce or entirely prevent the degradation seen in systems that rely on the global allocator. Six dimensions - fragmentability, allocation density, variation, locality, utilization, and contention - will be introduced to depict the potential for performance penalties and aid the listener in determining which local allocator will offer the best performance in their subsystems. Evidence will be presented that identifying these dimensions, and selecting a local allocator based upon them, can lead to order-of-magnitude reductions in run time compared to systems using a global allocator.
-
John Lakos: Bloomberg, Software Engineering Manager
John Lakos, author of Large-Scale C++ Software Design, serves at Bloomberg LP in New York City as a senior architect and mentor for C++ Software Development world-wide. He is also an active voting member of the C++ Standards Committee’s Evolution Working Group. Previously, Dr. Lakos directed the design and development of infrastructure libraries for proprietary analytic financial applications at Bear Stearns. For 12 years prior, Dr. Lakos developed large frameworks and advanced ICCAD applications at Mentor Graphics, for which he holds multiple software patents. His academic credentials include a Ph.D. in Computer Science ('97) and an Sc.D. in Electrical Engineering ('89) from Columbia University. Dr. Lakos received his undergraduate degrees from MIT in Mathematics ('82) and Computer Science ('81). His next book, entitled Large-Scale C++-Volume I: Process and Architecture, is anticipated in 2017.
-
Videos Filmed & Edited by Bash Films: www.BashFilms.com
*-----*
Register Now For CppCon 2022: cppcon.org/registration/
*-----*

Пікірлер: 36
@simonfarre4907
@simonfarre4907 3 жыл бұрын
This is probably one of the best talks ever given at CppCon.
@Omnicypher001
@Omnicypher001 23 күн бұрын
@39:36 lol
@niles_5003
@niles_5003 2 жыл бұрын
I sincerely hope this man is a professor somewhere. He's an amazing lecturer and definitely someone you want to learn a lot from. I like how he keeps people engaged, manages the room, and even made me laugh out loud all while covering some pretty technical material that's mostly new to me.
@IllumTheMessage
@IllumTheMessage 6 жыл бұрын
Excellent talk.
@hmpcon
@hmpcon 6 жыл бұрын
Lakos's talks are always a stream of consciousness :P
@matveyshishov
@matveyshishov 8 ай бұрын
Pure joy! ❤
@TimothyJesionowski
@TimothyJesionowski 5 жыл бұрын
Excellent presentation, very educational while being somehow entertaining. As a C fanboy this is one of the few c++ features I genuinely want, though I'm sure I can kind of get it with stateful functions.
@user-ey1dk2jz6h
@user-ey1dk2jz6h 2 жыл бұрын
Thank you, great talk
@CppCon
@CppCon 2 жыл бұрын
Glad you enjoyed it!
@azdinator
@azdinator 6 ай бұрын
Oh man. That guy is really good. Thank you.
@robbydomino
@robbydomino 6 жыл бұрын
great talk
@yb9737
@yb9737 Жыл бұрын
GREAT TALK
@xr.spedtech
@xr.spedtech 10 ай бұрын
This guy is cool
@greatbullet7372
@greatbullet7372 5 жыл бұрын
What a fucking GEM
@unevaguejaune8671
@unevaguejaune8671 5 жыл бұрын
34:25 Can someone explain me what the problem / purpose of the inline specifier is ? Or what he is trying to show ?
@SalokinX
@SalokinX 4 жыл бұрын
He wants to highlight the fact that the function definitions are meant to be Inline and that he didn't inline them (by defining the function in the class definition) just so it's easier to see on the slide.
@tomcheng3903
@tomcheng3903 4 жыл бұрын
The functions are inlined by default, so there's no need for the inline keyword - the compiler will error if you try to insert an extraneous 'inline', since it's not possible to have a non-inline allocator.
@Jimmy9Bazooka
@Jimmy9Bazooka Жыл бұрын
@@tomcheng3903 Nope. He's lying. You can have extra 'inline' specifier on an inline class function. There will be no error.
@LordNezghul
@LordNezghul 6 жыл бұрын
Talking "this is very important" should be at the end of part 2 not because "you said so/I am here" but because people already saw this is important.
@marinrusu9179
@marinrusu9179 5 жыл бұрын
23:37
@sampathsubasinghe929
@sampathsubasinghe929 3 жыл бұрын
49:58 How to determine allocation density is low for billion integers when reserved memory or capacity() is not given.
@rastaarmando7058
@rastaarmando7058 2 жыл бұрын
On my machine vector allocates (1.5 * sizeOfCurrentMemory) each time it runs out of space. should be similar on yours so, I guess u could use that?
@rocknroooollllll
@rocknroooollllll 6 жыл бұрын
Death by powerpoint, John. Every. Single. Time. You have great talent, but massive information overload.
@prateekpatil4845
@prateekpatil4845 5 жыл бұрын
I love it.
@greatbullet7372
@greatbullet7372 5 жыл бұрын
@@prateekpatil4845 me too ^^
@zokalyx
@zokalyx 7 ай бұрын
just a long presentation imo, not overloaded
@andik70
@andik70 Жыл бұрын
"we meaning me" :-)
@mrlithium69
@mrlithium69 6 жыл бұрын
@56:00 How has he not heard #pragma pack(push, 1). You put it around a specific struct, and disable it after w/ #pragma pack(pop)
@dyslexicunt
@dyslexicunt 6 жыл бұрын
Yeah it's always reassuring when someone deemed fit to give a presentation on custom allocators, is completely ignorant of a basic compiler feature dealing with memory alignment. Way to go.
@ciaran2679
@ciaran2679 6 жыл бұрын
I'd imagine it's because this is a talk about standard C++, not compiler-specific extensions.
@eggdish
@eggdish 6 жыл бұрын
I understand not knowing about a non standard pragma and personally I don't like the pragma anyway. However, the speaker is clearly misinformed about unaligned data hurting performance, or is programming in non-x86 environment. Google "lemire unaligned x86" for nice blog post with benchmarks. (Might not apply to floating point)
@Bozemoto
@Bozemoto 6 жыл бұрын
Useful for stuff like loading binary file headers like BMP and WAV though.
@andreyblack2558
@andreyblack2558 6 жыл бұрын
you just a stupid fool if your think what hi has newer heard about it, its a trick
@MsDuketown
@MsDuketown 4 ай бұрын
arena.h needs a forum.h Otherwize, floating atomics will extinguish humanity.
What's a Memory Allocator Anyway? - Benjamin Feng
48:30
Zig SHOWTIME
Рет қаралды 49 М.
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 108 МЛН
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 128 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 54 МЛН
1 or 2?🐄
00:12
Kan Andrey
Рет қаралды 52 МЛН
Go 1.20 Memory Arenas Are AMAZING | Prime Reacts
16:38
ThePrimeTime
Рет қаралды 96 М.
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 79 М.
CppCon 2016: Jason Turner “Practical Performance Practices"
1:00:29
I made a Compiler in 25 Days - Here is what I learned
40:59
Alex The Dev
Рет қаралды 50 М.
Object Oriented Programming is Good | Prime Reacts
31:30
ThePrimeTime
Рет қаралды 294 М.
Branchless Programming in C++ - Fedor Pikus - CppCon 2021
1:03:57
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 108 МЛН