Frame from C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024 Plays with YouTube's privacy-enhanced embed

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

Open on YouTube First HN thread

5 HN users recommended this talk in 4 different months between 2025 and 2026.

2007–2026
1 strong recommendation 4 recommendations 2 citations HackerTube score 4.5

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

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.

Pull quote: “In particular, his 2019 presentation [2] describes different error handling techniques” (HN, 2025)

Also tagged: c++ exceptions in embedded, c++, exceptions, firmware, binary size, embedded

What Hacker News said

7 labeled comments from the HN archive; up to 20 are kept per video, favoring different commenters. Each one links back to the original thread.

Strongly recommends inetknght September 2025 under How is Ultrassembler so fast?
Deep dive into exception mechanics and code size
Read the full comment
> 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
Recommends mpyne September 2025 under How is Ultrassembler so fast?
Reducing exception code size on embedded platforms
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)
Recommends neonz80 November 2025 under Async/Await is finally back in Zig
Exception overhead likely less than manual error handling
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.
Recommends daemin March 2026 under Practical Guide to Bare Metal C++
Explains bloat in exception handling for bare metal
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]

Citations, criticism and jokes

Cites it inetknght September 2025 under How is Ultrassembler so fast?
Notes a later talk is a rehash of this one
Update: it looks like link [4] is just a rehash of his talk from last year's cppcon [0]. [0]: [this video] [4]: [link]
Cites it vodou December 2025 under The C++ standard for the F-35 Fighter Jet [video]
Listed alongside the ACCU talk on exceptions and code size
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]

Keyboard shortcuts

/
Search
j k
Next / previous video in a list
Enter
Open the focused video
l
Like (on a video page)
w
Watch later (on a video page)
?
This help
Esc
Close