Current area: HOME -> Blogs -> CLR

Blog Posts Tagged With CLR

Do try...catch blocks hurt runtime performance?
Posted on Tuesday, February 19, 2008 at 6:23 AM
Recently, a friend mentioned that someone had told him that writing a try...catch block in C# (or substitute some other .Net language here) resulted in a "huge penalty" in terms of performance compared to if you had not written it. That is, merely writing such a block actually hurt program performance, even if an exception was never thrown. He didn't believe this was true, and rightly so - it's completely wrong. This post is a tidied up version of my explanation.

Inside a .Net Assembly

A .Net assembly, if we ignore various headers, consists of three things:
  • Bytecode: a sequence of low-level instructions that specify the body of a method
  • Metadata: a set of tables, a little bit like a database, describing higher level constructs such as classes, methods, signatures and so forth
  • Heaps: places where string constants and other such things are stored
Read More
Tags: .NET, C#, CLR, Exception

Subscribe

RSS Feed RSS Feed

More Tags

.NET C C# C# 3.0 C++ Embedded engineering service eveh3d firmware Hardware Linux Made-In-China offshore Operating System Outsource Perl product development Programming R&D Software

Help

Check out the Blog FAQ.




Newsletter | Submit Content | About | Advertising | Awards | Contact Us | Link to us |
© 1996-2008 Community Networks Ltd All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Synchron Data - .NET development.