Tencent Cloud Developer
Aug 9, 2021 · Fundamentals
Performance Evaluation and Implementation Overview of C++ Exceptions
Benchmarking C++ exceptions against error‑code handling reveals that frequent throws incur more than tenfold slowdown due to libc++ runtime functions like __cxa_allocate_exception and stack unwinding, while rare exceptions and empty try blocks add negligible overhead, highlighting the trade‑off between safety and performance.
C++Exceptionassembly
0 likes · 13 min read