Mani Ramaswamy and Peter Sollich: Inside Compiler in the Cloud and MDIL
- Posted: Nov 06, 2012 at 9:45 AM
- 43,470 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
By now you've learned that the CLR, Windows Phone Client, and Windows Phone Services teams got together to develop "Compiler in the Cloud". All Windows Phone 8 apps written in .NET technologies will get the benefit of this collaboration. The end goal? Really fast startup of Windows Phone 8 .NET apps.
"Compiler in the Cloud?", you ask.
The idea is pretty simple. First, enter MDIL or Machine Dependent Intermediate Language or .NET hybrid assembly language. MDIL is all about compiling to native assembly instructions whenever possible, and compile the rest to pseudo instructions that can quickly be translated to native instructions on the phone. Thus, this assembly containing a mix of pseudo instructions and native instructions can be shipped to the device (and is portable across the same architecture - example, across all the ARM devices), and on the device we perform a light-weight linking step to convert the entire assembly to a native image. Most of the heavy lifting is done when we compile the IL assembly to the intermediate file between an IL assembly and a native image (this is what MDIL is).
"So what?", you ask. The linking step on the device that converts MDIL assembly to a native image only takes 1/5th the time as traditional NGEN on device. Thus, we get some of the benefits of both pre-compilation (since we are executing off the native image where all instructions are assembly instructions) and JIT-compilation (no heavy compilation on the device during framework updates).
Tune in to meet the program manager for code generation in .NET, Subramanian (Mani) Ramaswamy, and one of the lead developers of "Compiler in the Cloud", Peter Sollich. Peter is an expert in precompilation. We go quite deep here with plenty of whiteboarding. Peter teaches us exactly what MDIL is and why it's designed the way it is. We also talk about the higher level meaning in this (apps start fast, at native speed!). All around, it's a great Going Deep episode. Take the time to watch and learn. Thanks Mani and Peter!!
See Subramanian's BUILD 2012 session where he goes into detail on MDIL/Compiler in the Cloud and other performance/functionality improvement in .NET for Windows Phone 8.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
NICE !
Now we need this on the Windows 8/RT and desktop CLR !
IIRC Peter Sollich was an old Borlander, master of Delphi compiler, an old college of Anders, and he owns the patent of MDIL http://www.freepatentsonline.com/y2011/0258615.html
btw, nice to see something in Bartok stuff appears in the normal CLR,
Any idea why the CLR team came up with Auto NGEN for the desktop instead ? I think this should be the way forward atleast for the .Net WinRT( Metro) apps. IIRC auto ngen is done using a on device maintenance task , so though the subsequent startups may be faster the initial startup would always be slower.
Hmmm... Peter Sollich mentioned that the next step should be a 'slower but better optimized compiler', guess that vision may have something to do with this ? https://careers.microsoft.com/jobdetails.aspx?jid=81397
@felix9:
Compilers evolve, dude.
C
Great technology. It will be very interesting to hear about phase two, when it arrives, which is the improved optimization in the cloud. It's also cool to think about application updates arriving automatically without the interaction of the developer because an improved compiler yields improved performance. So the end user could see messages like "applications updated with improved performance". That must be a pretty motivating thought for the team.
Great talk.
Will we ever be able to get a proper native code compiler for .NET or must we rely in projects like Mono?
I've built a tool to analyse the MDIL assemblies
MDILDump : https://github.com/WalkingCat/mdildump
It's based on the docs in those patents, hope its helpful for people interested.
Very interesting
However it was very hard to recognize a half of Mani Ramaswamy's speech
Please, speak more distinctly at least when it is recorded to watch worldwide
Remove this comment
Remove this thread
close