In .net why is throwing an exception computationally heavy?
+6
A:
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.
Reed Copsey
2009-04-03 00:14:45