[Mono-list] Exceptions and error codes.

Miguel de Icaza miguel@ximian.com
25 Mar 2003 11:08:56 -0500


Hello,

> I think the original point made was that unless you have profiling
> information to back up any claim that "this part of the software" will
> slow you down. Then use a mechanism which will make your code more
> maintainable.
> 
> The example below clearly has performance issues. However if the
> function handle_number_argument below takes 100 ms to process, the 5 or
> 10 extra lines of assembly added by the try/catch becomes meaningless in
> terms of overall performance. You'd better spend your time improving
> that function then rewriting the parser of Int32.

You are confused.

Throwing and catching an exception is not 10 extra lines of assembly, it
is very very expensive, on the order of thousands of instructions.

Miguel.