C++ Exceptions for Smaller Firmware - Khalil Estell - CppCon 2024
CppCon5 HN recommenders · recommended in 4 months, 2025–2026
talk · advanced · evergreen · 2025–2026 on HN
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++.
Up next
3 mo on HNInside Africa's Food Forest Mega-Project
Andrew Millison
3 HN recommender · 2025–2026
4 mo on HNDe-fragmenting C++: Making Exceptions and RTTI More Affordable and Usable - Herb Sutter CppCon 2019
CppCon
3 HN recommender · 2020–2025
3 mo on HNCppCon 2017: Fedor Pikus “C++ atomics, from basic to advanced. What do they really do?”
CppCon
3 HN recommender · 2017–2025
3 mo on HNCppCon 2017: Chandler Carruth “Going Nowhere Faster”
CppCon
2 HN recommender · 2017–2026
2 mo on HNAmazon Sells Fake Electrical Fuses
Louis Rossmann
2 HN recommender · 2024–2026
3 mo on HNJared Mauch - Getting Fiber To My Town (NLNOG Live! September 2020)
NLNOG
3 HN recommender · 2020–2025
9 mo on HNThe essence of calculus
3Blue1Brown
10 HN recommender · 2017–2025
10 mo on HNCppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17”
CppCon
13 HN recommender · 2016–2024
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNLexical Scanning in Go - Rob Pike
GoogleFOSSSydney
13 HN recommender · 2012–2025
10 mo on HNCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
9 HN recommender · 2018–2026
9 mo on HNRustConf 2018 - Closing Keynote - Using Rust For Game Development by Catherine West
Rust Programming Language
9 HN recommender · 2018–2023
7 comments from Hacker News
> 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
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
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.
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)
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.
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
Update: it looks like link [4] is just a rehash of his talk from last year's cppcon [0]. [0]: ▶ this video [4]: link