On 2007-04-16 19:23,
gr******@gmail.com wrote:
The application I'm working on will run on Linux, in user space. If I
use exception handling in parts of the application, will that affect
the performance of sections of code which do not use any exception
handling? Basically, I'm looking at optimizing a critical path, and
wondering if I can keep the exceptions elsewhere in code which are
working fine.
First of all, do you have any reason (such as measurements) to believe
that your code is losing execution-speed due to exceptions? Don't forget
the golden rule of optimization: measure first.
Some compilers allow you to turn off exceptions, so if you can compile
the critical code without exceptions and the other with it might solve
the problem for you. But it probably means creating special rules in
your Makefiles or whatever you are using.
--
Erik Wikström