In .net why is throwing an exception computationally heavy?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Things like computing the full call stack at the exception point take time and computation.
However, there is some places where .NET does better than C++, since it doesn’t have to track memory that needs to be cleaned up the same way as a C++ exception handler.
For some more details, I’d recommend Rico Mariani’s blog post on this subject.