[Mono-list] Exceptions and error codes.
Thong (Tum) Nguyen
Wed, 26 Mar 2003 04:10:20 +1200
> -----Original Message-----
> From: Miguel de Icaza [mailto:email@example.com]
> Sent: Wednesday, 26 March 2003 4:09 a.m.
> To: Philippe Lavoie
> Cc: firstname.lastname@example.org; email@example.com
> Subject: RE: [Mono-list] Exceptions and error codes.
> > I think the original point made was that unless you have profiling
> > information to back up any claim that "this part of the software"
> > 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
> > 10 extra lines of assembly added by the try/catch becomes
> > 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,
> is very very expensive, on the order of thousands of instructions.
I think Phil was referring to the try/catch. Throwing exceptions is
expensive -- but only if they're actually thrown.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.461 / Virus Database: 260 - Release Date: 10/03/2003