Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    C++ and Beyond 2012: Herb Sutter - atomic Weapons 2 of 2

    alexsmail

    2 HN recommenders · recommended in 6 months, 2019–2024

    YouTube

    1:32:33 · 29K views · Nov 6, 2017

    Part two of Herb Sutter's C++ and Beyond 2012 session on atomic weapons, a deep dive into the C++ memory model, atomics, memory ordering, and hardware behavior. It ends with the modern meaning of volatile.

    HN recommends it as an in-depth, practical introduction to atomics and weak versus strong memory ordering, relevant to ARM and Rust as well as C++.

    Software Engineering & LanguagesC, C++, Rust, Go & systems languagesComputer architecture & CPUs
    1. 1:54:00
      Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022CppCon277K views • 3 years ago
    2. 1:14:22
      CppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”CppCon289K views • 9 years ago
    3. 1:29:06
      CppCon 2015: Herb Sutter "Writing Good C++14... By Default"CppCon193K views • 11 years ago
    4. 1:39:25
      CppCon 2016: Herb Sutter “Leak-Freedom in C++... By Default.”CppCon149K views • 10 years ago
    5. 1:04:33
      CppCon 2014: Jeff Preshing "How Ubisoft Develops Games for Multicore - Before and After C++11"CppCon53K views • 12 years ago
    6. 1:40:27
      CppCon 2014: Herb Sutter "Back to the Basics! Essentials of Modern C++ Style"CppCon323K views • 12 years ago
    7. 1:05:39
      The One-Decade Task: Putting std::atomic in CUDA. - Olivier Giroux - CppCon 2019CppCon11K views • 7 years ago
    8. 1:47:45
      CppCon 2017: Herb Sutter “Meta: Thoughts on generative C++”CppCon105K views • 9 years ago
    9. 1:12:27
      CppCon 2015: Andrei Alexandrescu “std::allocator...”CppCon196K views • 11 years ago
    10. 1:13:41
      CppCon 2014: Chandler Carruth "Efficiency with Algorithms, Performance with Data Structures"CppCon235K views • 12 years ago
    11. 1:19:52
      CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”CppCon264K views • 10 years ago
    12. 52:54
      Rust at speed — building a fast concurrent databaseJon Gjengset225K views • 7 years ago
    13. 1:16:58
      code::dive conference 2014 - Scott Meyers: Cpu Caches and Why You CareNOKIA Technology Center Wrocław231K views • 11 years ago
    14. 1:33:02
      2013 Keynote: Chandler Carruth: Optimizing the Emergent Structures of C++CppNow34K views • 13 years ago
    15. 1:33:12
      De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter CppCon 2019CppCon90K views • 7 years ago
    16. 1:00:40
      Dmitry Vyukov — Go scheduler: Implementing language with lightweight concurrencyHydra47K views • 7 years ago
    17. 1:31:14
      CppCon 2017: Titus Winters “C++ as a "Live at Head" Language”CppCon53K views • 9 years ago
    18. 30:12
      Casey Muratori | Smart-Pointers, RAII, ZII? Becoming an N+2 programmerxDahl163K views • 2 years ago
    19. 36:10
      CppCon 2019: Emery Berger “Mesh: Automatically Compacting Your C++ Application's Memory”CppCon15K views • 7 years ago
    20. 1:27:46
      CppCon 2014: Mike Acton "Data-Oriented Design and C++"CppCon863K views • 12 years ago

    6 comments from Hacker News

    1. @chc4Aug 2024· in “Rust Atomics and Locks (2023)”

      "Is Parallel Programming Hard, And, If So, What Can You Do About It?" is one of the best books about atomics and concurrency, and my #2 recommendation. [LINK] My #1 actually isn't a book at all, but the two "atomic Weapons" talks by Herb Sutter, which are extremely good. [LINK] this video

      Strongly recommendsView on HN
    2. @NobodyNadaNov 2023· in “C++ Memory Model: Migrating from x86 to ARM”

      For a more in depth introduction to the topic with a lot of practical code examples, I highly recommend Herb Sutter’s excellent talk: Part 1 [LINK] Part 2 this video

      Strongly recommendsView on HN
    3. @NobodyNadaOct 2021· in “Ask HN: What does one look for in a laptop these days?”

      It’s true that ARM alone isn’t the reason for the M1’s performance, but it’s definitely a significant factor. x86 is old — modern x86 chips are still backwards-compatible with the original 8086 from 1978 — and it’s stuck with plenty of design decisions that might have been the correct choice sometime within the past 45 years but no longer today. Whereas the M1 only implements AArch64, a complete redesign of the ARM architecture from 2012, so it doesn’t have to deal with legacy architectural baggage. (We’ve known x86 was the wrong design since the 80’s — hence why there’s no Intel chips in smartphones — but it hasn’t been realistic for anybody except Apple to spend 10 years and billions of dollars to make a high-performance non-x86 chip.) Some examples: - x86 guarantees strong memory ordering on multi-processor systems, which adds completely unnecessary overhead to every memory access. arm64 uses a weak memory model instead, providing atomic instructions with relaxed or acquire/release semantics (see this video for a more detailed discussion). This significantly improves performance all around the board, but especially with reference counting operations (which are extremely common and often a bottleneck in code written in ObjC/Swift): [LINK] > fun fact: retaining and releasing an NSObject takes ~30 nanoseconds on current gen Intel, and ~6.5 nanoseconds on an M1 - x86 instruction decode is pretty awful, a significant bottleneck, and not parallelizable due to the haphazardly-design

      CitesView on HN
    4. @mlindnerJan 2023· in “Rust Atomics and Locks: Low-Level Concurrency in Practice”

      The book, especially chapter 7 seems to say several things completely opposite to what Herb Sutter did in his famous talk a number of years ago. In the book: > This means that on ARM64, sequentially consistent operations are exactly as cheap as acquire and release operations. Or, rather, that ARM64 Acquire, Release, and AcqRel operations are as expensive as SeqCst. Unlike x86-64, however, Relaxed operations are relatively cheap, as they don’t result in stronger ordering guarantees than necessary. However in Herb Sutter's talk (specifically the second half here: this video ) he says that ARMv8 Acquire/Release/AcqRel operations are cheaper than SeqCst. This book seems to claim that x64 is somehow superior to ARMv8, which from my understanding is completely wrong.

      CitesView on HN
    5. @cowtoolsJul 2022· in “Ask HN: Can competitors catch up to Apple Silicon?”

      I would imagine that any implementation of x86 would have to bear the weight of reverse-compatibility. With reverse comparability, the bad design decisions just compound, for example complicated stuff like memory synchronization this video

      CitesView on HN