Re: How much processor resources do try-catch blocks in C# use

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Marc Butenko (mbutenko_at_state.mt.us)
Date: 05/19/04


Date: Wed, 19 May 2004 16:12:05 -0600

You are right...if no exceptions are thrown, the differences are
imperceptible -- the only major overhead is incurred when the exception is
thrown...

-- 
Marc Butenko
mbutenko@bresnan.net
"David Alexander" <dalexander1@protocolmarketing.com> wrote in message
news:Od1CDudPEHA.3988@tk2msftngp13.phx.gbl...
> I was discussing with someone how much processor resources try-catch
blocks
> use in C#. I would think that if no exceptions were thrown by a block of
> code in a try block, it would run as quickly as a block that wasn't inside
a
> try block.
>
> Even if using try-catch blocks do incur some extra resource use, I doubt
> that it is significant in an unthreaded application that handles large
data
> sets.
>
> Does anyone know for sure?
>
>


Relevant Pages

  • Re: Reflection problem
    ... I'm pretty sure that there are no exceptions being thrown while ... >> Incoming mail is certified Virus Free. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Configuration Error Not Helpful
    ... >What kind of error in the configuration section causes the exception to be ... schema validation, and any error that gets thrown from that gets this ... those exceptions never got displayed. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: sending over DO seems to make main process block?
    ... DO is one of the few places in Cocoa where exceptions are thrown that ... an exception may be thrown when the ... avoid deadlock. ... the sender expects to be called back from the receiver, ...
    (comp.sys.mac.programmer.help)
  • Re: throw in a finally
    ... > other well-documented texts available that point out this problem. ... > that the reasons behind it are the same as the reasons behind why ... Catch exceptions thrown in a finally even if the method declares they are ... Catch exceptions and just log them. ...
    (comp.lang.java.programmer)
  • How much processor resources do try-catch blocks in C# use
    ... I was discussing with someone how much processor resources try-catch blocks ... I would think that if no exceptions were thrown by a block of ...
    (microsoft.public.vsnet.general)