
25 Mar
2011
25 Mar
'11
7:17 a.m.
Emil Dotchevski wrote:
On Thu, Mar 24, 2011 at 8:03 PM, Gruenke, Matt <mgruenke@tycoint.com> wrote:
I did a little bit of performance testing and found BOOST_THROW_EXCEPTION to add about 45% overhead (CPU: Intel Xeon X5570; compiler: gcc-4.2.3; optimization: -O2) vs straight 'throw' of simple std::exception-derived class. So, it's not exactly free. That said, neither is blazingly fast.
Could you clarify, what do you mean by overhead? Speed? Speed of throwing an exception? Speed of catching an exception? Code size? Compilation time?
I think a different question is worth asking -- did you measure any of above? - Volodya -- Vladimir Prus Mentor Graphics +7 (812) 677-68-40