Jump to content

  • Log In with Google      Sign In   
  • Create Account

Descriptive Error Handling


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
22 replies to this topic

#21 Ectara   Crossbones+   -  Reputation: 2979

Like
0Likes
Like

Posted 11 February 2014 - 10:45 PM


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.



Sponsor:

#22 Hodgman   Moderators   -  Reputation: 30424

Like
2Likes
Like

Posted 11 February 2014 - 11:19 PM

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.



#23 frob   Moderators   -  Reputation: 21475

Like
0Likes
Like

Posted 12 February 2014 - 05:08 PM

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...


Check out my personal indie blog at bryanwagstaff.com.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS