Descriptive Error Handling

Started by
21 comments, last by frob 10 years, 2 months ago


If they are implemented in code there is a runtime cost (even if you don't call an exception) is incurred every time a try, catch, or finally is placed in your code. It also adds a small cost to every function call's prologue. Based on numbers I've read, the cost is about a 6% penalty globally.


However, you must pay for the potential to unwind the stack and RTTI, whether you use it or not.

We're on the same page.

I'm ready to declare this discussion finished. I don't think there's any new information to be had, and I was already well versed in the pros and cons of C++ exceptions before I started this thread. I appreciate everyone's responses.

Advertisement

I'm still not a fan of C++ exceptions, but for the record, the "passive" cost of them being there is much lower when compiling for x86-64.

I'm still not a fan of C++ exceptions, but for the record, the "passive" cost of them being there is much lower when compiling for x86-64.

I look forward to the day when all my PC programs can be compiled for 64-bit extensions. Everything is so much better.

Right now we dual-build 32-bit and 64-bit versions for in-house tools and various utilities. The combination of extra registers and guaranteed SIMD functionality seem to make the optimizer so much happier. Sadly we haven't reached the day when the shipped binaries are 64-bit, and the cost for QA on both is still prohibitive. Someday...

This topic is closed to new replies.

Advertisement