Hi,
> Hello all,
> 
> With gcc, does the fact that some branch results in a C++ exception
> effect the performance of a function when that exception branch
> isn't entered? In other words, does the presence of a throw effect
> the optimizer in any way?

EH handling is implemented in a way minimizing performance impact on code paths
not involving exceptions (and having considerable cost when exception is
thrown). It is not fully free however. Presence of throw usually imply presence
of cleanup regions (calling destructors) that increases function size and may
in turn prevent some optimizations over the non-EH path such as inlining,
because code gets too large.

Honza
> 
> -- David Sankel
> 
> -- 
> David Sankel <da...@stellarscience.com>
> Stellar Science Ltd Co - Stellar Scientific Software Solutions
> 

Reply via email to