What is the best way to measure exception handling overhead/performance in C++?
Please give standalone code samples.
I\'m targeting Microsoft Visual C++ 2008
Won't the answer depend on what cleanup has to happen as a result of a throw? If an excpetion is thrown that causes a whole load of objects to go out of scope up the stack, then that will add to the overhead.
In other words, I'm not sure if there is a an answer to the 3rd question that is independent of the specifics of the code.
Section 5.4 of the draft Technical Report on C++ Performance is entirely devoted to the overhead of exceptions.