There has been a lot of discussion over the years about when and how to use exception throwing and handling. The general consensus seems to shift every once in a while. The performance of exceptions is not the primary purpose of this article, but I felt the need to discuss it in order to truly address the role of exceptions in software troubleshooting.
Exceptions are Expensive, like Store Brand is Cheap
Maybe the best way to breach the topic of exception performance is to simply give you a short list of axioms that I believe to be true.
1. Exceptions are expensive
It has been proven many times that there is additional cost associated with constructing and throwing an exception. This seems to be exaggerated in managed applications (.NET, Java, etc.). That being said, this extra “cost” of constructing and throwing an exception would only be noticeable in time-critical real-time systems, or if they are used excessively. That brings me to my next axiom…
Read More »Exceptional Introduction