Reducing Try Catch Block will Improve the Performance ?
Reducing Try Catch Block will Improve the Performance ?, can any body explain how the try catch block internally works, does it do any additional work if we put our code inside it ?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dipal ChoksiPosted Sep 9, 2010, 4:07 AM
Here are some interesting discussions on this topic:
http://msmvps.com/blogs/peterritchie/archive/2007/06/22/performance-implications-of-try-catch-finally.aspx
http://www.programmersheaven.com/user/pheaven/blog/175-Do-trycatch-blocks-hurt-runtime-performance/
Mahesh ChandPosted Sep 2, 2010, 3:10 PM
For example, if there is some code like this.
string s = "mahesh";
It would not make sense to put a try..catch around this code.
Suthish NairPosted Sep 2, 2010, 2:45 PM
Exception Handling in C# by Rajesh VS
Getting Started with Exception Handling in C# by Suprotim Agarwal
Other Links:
http://www.programmersheaven.com/user/pheaven/blog/175-Do-trycatch-blocks-hurt-runtime-performance/
http://msmvps.com/blogs/peterritchie/archive/2007/06/22/performance-implications-of-try-catch-finally.aspx
http://www.blackwasp.co.uk/SpeedTestTryCatch.aspx