Here’s an article under Jon’s Homepage that was just brought to my attention. It’s an interesting analysis of (approximately) the raw cost of throwing an exception. Jon is definately right on that 200 exceptions per hour isn’t gonna hurt anything.
However, there are some problems with the analysis at least in my opinion, because I believe it understates the true costs. I thought it would make a fun exercise to think about the approach taken because it is an interesting topic, and the techniques for thinking about the true cost are generally applicable.
So, asking Jon’s kind forgiveness for picking on him, gentle readers, can you tell me why I would say this benchmark understates the cost?
Consider it a mini-quiz 🙂
Some other references that might be helpful:
My answers to follow.