Re: perf & Try Catch
From: David Levine (noSpamdlevineNNTP2_at_wi.rr.com)
Date: 01/01/05
- Next message: Kevin R: "Re: Fullscreen program/game (example) ?"
- Previous message: BOOGIEMAN: "Re: Fullscreen program/game (example) ?"
- In reply to: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Next in thread: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Reply: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 1 Jan 2005 06:44:50 -0600
>
> Having had a look at the JITted code, I think it's more a case of the
> JIT not being able to optimise as heavily, not being able to enregister
> as much.
There may be additional housekeeping that isn't obvious just from the JITted
code. Also, did you compile with debug or release settings? (it could make a
difference in how aggressive the optimizations are).
>
> Personally I think that apart from a very, *very* few situations,
> exception handling should be implemented according to elegant design
> rather than optimal performance. In the case we're talking about, the
> processing within the loop would have to be *very* simple for the cost
> of adding the try/catch to end up being particularly significant.
>
I agree completely - design for correctness first, then go back and look at
optimizations as needed. However, this only came up because a statement was
made that there was no cost at all to using a try block, and that statement,
as far as I can tell, is false.
- Next message: Kevin R: "Re: Fullscreen program/game (example) ?"
- Previous message: BOOGIEMAN: "Re: Fullscreen program/game (example) ?"
- In reply to: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Next in thread: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Reply: Jon Skeet [C# MVP]: "Re: perf & Try Catch"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|