🚀 Rethinking C++ Exceptions: From "Forbidden" to Blazing Fast 🤯 I rarely rewatch conference talks immediately, but Khalil Estell CppCon 2025 presentation was an exception . ☢️ If you’ve ever worked on microcontrollers, you know the unwritten rule: Turn off exceptions immediately. We’ve been told for years that -fno-exceptions is the only way to keep our code fast and deterministic. 💎 But Khalil Estell just proved us all wrong. 💎 🧠 He didn't just talk about theory; he tore down the standard GCC runtime and rebuilt it. By the end of his talk, he managed to make C++ exceptions 93% faster. Yes, you read that right. It is amazing to see someone take a feature often banned in embedded dev and optimize it to the point where it competes with return codes. 🤯 👏 Huge thanks to Khalil Estell for the incredible work and the clear presentation. You’ve definitely changed how I look at error handling today. 💻 Watch the full talk here: https://lnkd.in/dqwnW3ir #cpp #cppcon #embedded #programming #performance #lowlevel #softwareengineering #coding #arm #cplusplus #microcontrollers #systemdesign #baremetal #gcc #optimization
Khalil Estell Optimizes C++ Exceptions for Blazing Speed
More Relevant Posts
-
## Memory allocation in C : Part 2 ## 📌 Static Memory Allocation in C Static memory allocation is one of the most fundamental concepts in C programming. In this approach, memory size is decided at compile time, and the allocated memory remains fixed throughout the program’s execution. 🔹 Key characteristics of static memory allocation: Memory is allocated before program execution Size cannot be changed at runtime Memory is managed automatically by the compiler Faster access compared to dynamic allocation No risk of memory leaks 🔍 Common examples include: Global variables Static variables Fixed-size arrays int a = 10; static int count; int arr[10]; 💡 Where static allocation is useful: Embedded systems with limited memory Real-time applications Programs where memory requirements are known in advance Situations where reliability is more important than flexibility ⚠️ Limitations: Memory cannot be resized Can lead to wasted memory if not planned carefully Less flexible than dynamic allocation Understanding static memory allocation helps build a strong foundation for mastering stack and heap memory, and is essential before moving on to dynamic memory concepts. ## Memory allocation in C : Part 1 link -->https://lnkd.in/ga-aH6BG #CProgramming #StaticMemory #MemoryAllocation #EmbeddedSystems #ProgrammingFundamentals
To view or add a comment, sign in
-
Safety Beyond Memory: The Many Dimensions of Safety in C++ The debate over C++ safety often defaults to a discussion of memory management. But what about type safety, thread safety, resource management, and exception safety? This article provides a needed holistic view, exploring the many dimensions of what truly makes code safe and robust. It is an important read for any developer looking to have a more nuanced conversation about the strengths and disciplines of modern C++. https://lnkd.in/ggr8pn9g #cpp #SoftwareDevelopment #Programming #CodeSafety
To view or add a comment, sign in
-
-
Many beginners write C code… but don’t understand how it actually becomes a program. Clicking Run hides the truth. Using GCC from the command line shows you: • how source code becomes an executable • what the compiler really does • why build errors happen • how real firmware is built If you want to grow in embedded or firmware development, you must understand the build process - not just the syntax. 💬 Did you learn C using an IDE first, or the command line? Comment 👇 👉 Practical embedded learning: https://lnkd.in/gZukRWZs #EmbeddedC #GCC #FirmwareDevelopment #EmbeddedSystems #PievCore
To view or add a comment, sign in
-
-
Why volatile can make or break embedded software The compiler is smart. Too smart sometimes. If a variable is updated by: • an ISR • hardware register • another execution context …and it’s not marked volatile, the compiler may: • cache it • skip memory reads • optimize your logic away Your code looks correct. Your system still fails. Rule: If hardware or concurrency can change a variable → mark it volatile. Embedded engineering is not just C programming. It’s understanding how the compiler thinks. 💬 Where have you used volatile in your projects? #CProgramming #EmbeddedC #RealTimeSystems #EmbeddedSystems #EmbeddedSoftware #FirmwareEngineering
To view or add a comment, sign in
-
Day 15 of My Embedded Systems + RTOS Journey Today didn’t go exactly as planned — and that’s part of the process. While setting up ESP-IDF to continue working with FreeRTOS queues, I ran into an environment issue related to the Python setup. The installed RTOS tools weren’t properly configured, and errors like pkg_resources cannot be imported started appearing. Instead of jumping ahead, I took time to understand: How ESP-IDF manages its own Python virtual environments Why toolchains (xtensa, riscv, GDB) are required How version mismatches (like Python 3.12 vs 3.10) can break builds The importance of proper environment setup in embedded development Today was less about writing RTOS code and more about understanding the build system behind it. One key lesson: In embedded systems, environment setup is just as important as firmware logic. A misconfigured toolchain can stop everything. Debugging the setup is also engineering. Back tomorrow to continue with RTOS task communication — this time on a stable foundation. #EmbeddedSystems #ESP32 #RTOS #FreeRTOS #ESP_IDF #FirmwareDevelopment #EngineeringJourney #LearningInPublic
To view or add a comment, sign in
-
Before the compiler ever sees your C++ code, it goes through an important step called preprocessing. The preprocessor runs first and performs text-based transformations such as: • Expanding #include directives • Handling macros defined using #define • Enabling or disabling code using conditional compilation (#ifdef, #ifndef, #if 0) • Removing comments and preparing the code for compilation The result of this step is a translation unit, which is what the compiler actually compiles. Understanding the preprocessor helps demystify: • How header files really work • Why macros behave differently from variables and functions • How compile-time configuration is achieved in C++ 📘 I’ve written a beginner-friendly article over Substack explaining the C/C++ preprocessor in detail, with examples and practical insights. I have attatched link for article in comment. #CPP #Preprocessor #Macros #Programming
To view or add a comment, sign in
-
You can now get your own copy of the Quadrate compiler toolchain on a diskette! The package include a 3.5 inch diskette with pre-combiled binaries as well as the complete source code. In addition it contains a Quadrate demoscene demo, as if the 90s was back, that cannot be found anywhere else. All diskettes are uniquly numbered and comes with printed installation instructions as well as a printed bug report form. https://quad.r8.rs/get/ #programming #compiler #softwareengineering #opensource #stackbased #concatenative #devtools #diskette
To view or add a comment, sign in
-
-
Headline: Day 28/30 C++: Beyond the Console — Persistent Storage 💾📝 Today’s revision focused on File I/O, the bridge between a running program and permanent storage. In C++, the <fstream> library makes interacting with the file system feel remarkably similar to standard console I/O. Using ofstream to write and ifstream to read, I built a small system to log data to the hard drive. Pro-Observation: One of the most important steps in file handling isn't the reading or writing—it's the Validation. Checking .is_open() before performing operations is a non-negotiable step for building robust, "crash-proof" software. It’s exciting to see my C++ apps finally have a "memory" that persists even after the process ends. We are in the home stretch! 🚀 #cpp #softwareengineering #persistence #30daysofcode #learninginpublic #programming #Day28
To view or add a comment, sign in
-
-
Quick note: C++26 introduces compile-time reflection for advanced metaprogramming, like introspective code structures. Features: https://lnkd.in/gGWx6sb8 From object-oriented work, this opens new designs. Anticipating C++26 reflection? Share! #CPP #CPlusPlus26 #Reflection #ModernCpp #Programming
To view or add a comment, sign in
-
📌 Stack vs Heap Memory in C Understanding memory management is a core skill for every C programmer and embedded developer. 🧠 Stack Memory • Stores local variables and function calls • Automatically managed • Very fast • Limited size • Risk: Stack Overflow 🧩 Heap Memory • Used for dynamic memory allocation • Managed using malloc(), calloc(), realloc(), free() • Flexible size • Slightly slower • Risk: Memory leaks Knowing when to use stack vs heap is very important in Embedded Systems and System Programming. 💻 Example: #include <stdio.h> #include <stdlib.h> void example() { int stackVar = 10; int *heapVar = (int*)malloc(sizeof(int)); *heapVar = 20; printf("Stack: %d\n", stackVar); printf("Heap: %d\n", *heapVar); free(heapVar); } int main() { example(); return 0; } #CProgramming #EmbeddedSystems #MemoryManagement #Firmware #SystemProgramming #Coding
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development