473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Why learn MSIL

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

Oct 29 '07 #1
6 1759
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" <Go*********@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegro ups.com...
I'm wondering what's the benifit of learning MSIL. I can only think
about debugging. Can anyone give me some hints?

Oct 29 '07 #2
On Oct 29, 1:46 pm, Creativ <GongXinr...@gmail.comwrote:
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

Oct 29 '07 #3
On Oct 29, 9:59 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamMwrote:
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" <GongXinr...@gmail.comwrote in message

news:11**********************@19g2000hsx.googlegro ups.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.

Oct 29 '07 #4
On Oct 29, 2:38 pm, Creativ <GongXinr...@gmail.comwrote:
On Oct 29, 9:59 pm, "Cowboy \(Gregory A. Beamer\)"

<NoSpamMgbwo...@comcast.netNoSpamMwrote:
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" <GongXinr...@gmail.comwrote in message
news:11**********************@19g2000hsx.googlegro ups.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

Oct 29 '07 #5
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
Oct 30 '07 #6
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
Nov 1 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Raymond Lewallen | last post by:
Is there some article out there that helps in reading MSIL? I've been looking but can't find anything, and I'm probably just looking in the wrong spots for the wrong keywords. I understand mov,...
7
by: Raymond Lewallen | last post by:
Microsoft, Can I make a request for a newsgroup specific to MSIL? I have taken great interest in MSIL and have done a lot of reading into MSIL, and written, compiled and tested with success a...
6
by: TrickyDicky | last post by:
Hi all, I'm just starting to experiment with MSIL but am getting confused about c# and MSIL integration. I understand that c# is compiled into MSIL before it is JIT'ed and then executed. I...
6
by: Pawel | last post by:
Ary you know tools to convert MSIL code (Assembly) to Win32 (not Just In Time)?
7
by: carl.manaster | last post by:
Hi, I'd like to take a string containing MSIL code, assemble it, execute it, and receive the result all from my running C# application. So far I've managed to manually create some MSIL code...
4
by: James dean | last post by:
My understanding is the MSIL runs on the CLR and the CLR is basically the JIT compiler plus Garbage collection. This part "MSIL runs on the CLR" is a bit vague to me can anyone give me a clearer...
3
by: NigelW | last post by:
Clarification needed please. If I compile a C++ program with the /clr option inpsection of the resulting assembly with ILDASM shows MSIL even for methods in classes for which I have not...
1
by: John Doe | last post by:
Hi all, I have a lot of confusion about what this runtime environment is. When I write an application with unmanaged code and unmanaged data, can I compile it to the MSIL, or it will compile...
3
by: Mark Fox | last post by:
Hello, I have read a lot about how the .NET Framework uses MSIL as its intermediate language. If I have a project in C# in VS.NET 2003, how do I get the MSIL for it so I could look at it? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.