HackerTube
HomeLongsLikedHistoryWatch laterCategoriesPlaylistsSettings

C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024

CppCon5 HN recommenders · recommended in 4 months, 2025-2026
YouTube
23K views · 1 year ago · talk · evergreen

Khalil Estell's CppCon 2024 talk argues C++ exceptions can reduce binary size in firmware. He digs into how exceptions work and how to shrink their code footprint on embedded platforms.

Pointed to as the in-depth talk on exception mechanics and code size for embedded C++.

C, C++, Rust, Go & systems languagesEmbedded systems & DIY electronicsSoftware performance & optimization#c++#exceptions#firmware#binarysize#embedded

7 comments from Hacker News

@daemin2026 · in “Practical Guide to Bare Metal C++”

I just thought I'd mention that Khalil Estell is doing some work regarding exceptions in embedded and bare metal programming. In the first of his talks about this topic ( ▶ this video ) he mentions that a lot of the bloat in exception handling is including printf in order to print out the message when terminating the program. For those interested he has another presentation on this topic link

RecommendsView on HN
@vodou2025 · in “The C++ standard for the F-35 Fighter Jet [video]”

Need to check it out. I guess you mean these: - C++ Exceptions Reduce Firmware Code Size, ACCU [1] - C++ Exceptions for Smaller Firmware, CppCon [2] [1]: link [2]: ▶ this video

CitesView on HN
@neonz802025 · in “Async/Await is finally back in Zig”

There was an interesting talk about C++ exceptions in smaller firmware at CppCon last year: ▶ this video Basically, the overhead of exceptions is probably less than handling the same errors manually in any non-trivial program. Also, it's not like these table doesn't exist in other languages. Both Rust and Go have to unwind.

RecommendsView on HN
@inetknght2025 · in “How is Ultrassembler so fast?”

Update: it looks like link [4] is just a rehash of his talk from last year's cppcon [0]. [0]: ▶ this video [4]: link

CitesView on HN
@inetknght2025 · in “How is Ultrassembler so fast?”

> I don't have enough time to watch these kinds of presentations. Then let me pick and share some of my favorites that I found enlightening, and summarize with some information that I found useful. By far, the most useful one is Khalil Estell's presentation last year [0]. It's a fairly face paced but relatively deep dive into exception mechanics. At the end, he advocates for a new tool that would audit a program to determine what exceptions could be thrown. I think that's a flipping fantastic idea for a tool. Unfortunately I haven't seen any progress toward it -- if someone here knows where his tool is, or a similar tool, please reply! I did send him an email a few months ago inquiring about it, but haven't received a reply. Nonetheless, the whole presentation was excellent in my opinion. I did see that he had another related presentation at ACCU this year [4] with a topic of "C++ Exceptions are Code Compression" (which I totally can believe -- I've seen it myself in binary sizes), but I haven't seen his presentation yet. I'll watch it later today. Just about anything from Herb Sutter is good. I don't like that he works for Microsoft, but he does great stuff for C++, including the old Guru of the Week series [1]. In particular, his 2019 presentation [2] describes different error handling techniques, some difficulties and pitfalls in combining libraries with different error handling techniques, and leads up to explaining why std::expected came about. He does pontificate a lot

Strongly recommendsView on HN
@mpyne2025 · in “How is Ultrassembler so fast?”

A specific presentation I'd point to is Khalil Estell's presentation on reducing exception code size on embedded platforms at ▶ this video But honestly you'd get vast majority of the benefit just by skimming through the slides at link With a couple of symbols you define yourself a lot of the associated g++ code size is sharply reduced while still allowing exceptions to work. (Slide 60 on)

RecommendsView on HN
@bluGill2025 · in “Software development topics I've changed my mind on”

Khalil Estell has some great work on that. ▶ this video is one link - very low level technical of what is really happening. He has other talks and papers if you search his name.

RecommendsView on HN
De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter  CppCon 20191:33:12

De-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter CppCon 2019

CppCon
90K 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
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 2015: Bjarne Stroustrup “Writing Good C++14”1:40:46

CppCon 2015: Bjarne Stroustrup “Writing Good C++14”

CppCon
351K 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 2018: Hana Dusíková “Compile Time Regular Expressions”54:48

CppCon 2018: Hana Dusíková “Compile Time Regular Expressions”

CppCon
14K views • 8 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: Chandler Carruth “High Performance Code 201: Hybrid Data Structures"55:49

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

CppCon
119K views • 10 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
Can C++ be 10x Simpler & Safer?  - Herb Sutter - CppCon 20221:54:00

Can C++ be 10x Simpler & Safer? - Herb Sutter - CppCon 2022

CppCon
277K views • 3 years ago
CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”59:58

CppCon 2018: Nicolai Josuttis “The Nightmare of Initialization in C++”

CppCon
79K views • 8 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 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 2015: Herb Sutter "Writing Good C++14... By Default"1:29:06

CppCon 2015: Herb Sutter "Writing Good C++14... By Default"

CppCon
193K views • 11 years ago
CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”52:01

CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook”

CppCon
158K views • 9 years ago
CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"1:07:35

CppCon 2015: Andrei Alexandrescu “Declarative Control Flow"

CppCon
102K views • 11 years ago
CppCon 2015: Timur Doumler “C++ in the Audio Industry”1:03:44

CppCon 2015: Timur Doumler “C++ in the Audio Industry”

CppCon
131K views • 11 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 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 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