In .net why is throwing an exception computationally heavy?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With