Why learn MSIL

Why learn MSIL

am 29.10.2007 21:46:06 von Creativ

I'm wondering what's the benifit of learning MSIL. I can only think
about debugging. Can anyone give me some hints?

Re: Why learn MSIL

am 29.10.2007 21:59:55 von NoSpamMgbworld

Overall, understanding what is going on underneath the hood is one reason.
Another is to understand enough to optimize your code. We ahve foudn some
rather inefficient code by examining IL before. Beyond that, I would state
that it is useful if you are writing compilers or similar tools.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Creativ" wrote in message
news:1193690766.440848.292660@19g2000hsx.googlegroups.com...
> I'm wondering what's the benifit of learning MSIL. I can only think
> about debugging. Can anyone give me some hints?
>

Re: Why learn MSIL

am 29.10.2007 22:25:02 von dave

On Oct 29, 1:46 pm, Creativ wrote:
> I'm wondering what's the benifit of learning MSIL. I can only think
> about debugging. Can anyone give me some hints?

It's generally good to see what the runtime is when generating CIL
from .NET code, for performance reasons, and it can also help you
structure your own code better (knowing what the resulting CIL looks
like). It's also good to know if your interacting with other
languages (either within or outside of your assembly).

dave

Re: Why learn MSIL

am 29.10.2007 22:38:20 von Creativ

On Oct 29, 9:59 pm, "Cowboy \(Gregory A. Beamer\)"
wrote:
> Overall, understanding what is going on underneath the hood is one reason.
> Another is to understand enough to optimize your code. We ahve foudn some
> rather inefficient code by examining IL before. Beyond that, I would state
> that it is useful if you are writing compilers or similar tools.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> *************************************************
> | Think outside the box!
> |
> *************************************************"Creativ" wrote in message
>
> news:1193690766.440848.292660@19g2000hsx.googlegroups.com...
>
>
>
> > I'm wondering what's the benifit of learning MSIL. I can only think
> > about debugging. Can anyone give me some hints?- Hide quoted text -
>
> - Show quoted text -

Can you please recommend me a good reading about how to write good-
performanced code?
I've skimmed the Inside MS IL Assembler. I don't think it's targetting
performance improvement.

Re: Why learn MSIL

am 29.10.2007 22:46:58 von dave

On Oct 29, 2:38 pm, Creativ wrote:
> On Oct 29, 9:59 pm, "Cowboy \(Gregory A. Beamer\)"
>
>
>
>
>
> wrote:
> > Overall, understanding what is going on underneath the hood is one reason.
> > Another is to understand enough to optimize your code. We ahve foudn some
> > rather inefficient code by examining IL before. Beyond that, I would state
> > that it is useful if you are writing compilers or similar tools.
>
> > --
> > Gregory A. Beamer
> > MVP, MCP: +I, SE, SD, DBA
>
> > *************************************************
> > | Think outside the box!
> > |
> > *************************************************"Creativ" wrote in message
>
> >news:1193690766.440848.292660@19g2000hsx.googlegroups.com.. .
>
> > > I'm wondering what's the benifit of learning MSIL. I can only think
> > > about debugging. Can anyone give me some hints?- Hide quoted text -
>
> > - Show quoted text -
>
> Can you please recommend me a good reading about how to write good-
> performanced code?
> I've skimmed the Inside MS IL Assembler. I don't think it's targetting
> performance improvement.- Hide quoted text -
>
> - Show quoted text -

I really enjoyed "Essential C#", liking both the author and publisher
(Michaelis / Addison Wesley). They mention several good patterns
within and often delve under the covers in helping avoid pitfalls.

This is a big question you ask so I'll just attack on area. Knowing
your data structures, how the work under the hood, strenghts /
weakneses of each, etc. is key to writting fast code. The deeper you
delve into data structures the better, goes with any framework (STL,
ATL, .NET, etc). E.g. you're probably aware favoring data structures
in System.Collections.Generic over System.Collections as of the 2.0
framework, thereby avoiding boxing / unboxing pitfalls (not to mention
gaining type safefy)... but i digress.

dave

Re: Why learn MSIL

am 30.10.2007 09:39:57 von Guffa

Creativ wrote:
> I've skimmed the Inside MS IL Assembler. I don't think it's targetting
> performance improvement.

The performance is rather up to the JIT compiler.

The IL code produced by a compiler often contains instructions that seem
redundant, but they are there to describe exactly what the code is
supposed to do. The JIT compiler will then optimise away many IL
instructions.

If you try to optimise the IL code, you will be removing information
from the code that the JIT compiler uses, and the final result is likely
to be less optimal.

--
Göran Andersson
_____
http://www.guffa.com

Re: Why learn MSIL

am 01.11.2007 01:26:46 von Alun Harford

Creativ wrote:
> I'm wondering what's the benifit of learning MSIL. I can only think
> about debugging. Can anyone give me some hints?

Performance.
Understanding.
Some tricks you can't sensibly do in C# (dynamic proxies are the classic
example).

If you know an assembly and you know C#, learning IL is trivial. So the
question is: Why not?

Alun Harford