Advertisement

.NET Native

Started by April 04, 2014 12:17 PM
11 comments, last by Ectara 10 years, 5 months ago

I am amazed this hasn't been posted or mentioned, I did a search but found nothing which is odd as DX12 was announced.

Links: http://blogs.msdn.com/b/dotnet/archive/2014/04/02/announcing-net-native-preview.aspx and http://msdn.microsoft.com/en-US/vstudio/dn642499.aspx

I haven't tried it out and I know it is Win Store atm but the blog / FAQ sounds promising for all things .NET. One of the things that really caught my eye was:

Will this allow C# developers better experience with developing highly graphical apps and/or games?

Yes. The .NET Native compiler shares parts of the code base with the Microsoft C++ optimizer.

However I am not entirely sure what it means by 'better experience', I would assume performance but it somewhat implies that people have been having performance issues with developing gfx apps in C# which I always was under the impression was rare simply due to how much content and work would be required to reach that, as in AAA quality products. I haven't even bothered attempting to make a store app but for those of you who have was performance issues noticeable in store games made in C#? Let me put it another way, I have been on the same project since early 2012, the project is for desktop and is growing with a lot of content yet performance issues have not occurred once, where C++ would have made a noticeable difference, despite pushing the limits gracefully and 95% being C#. Perhaps I am looking too much into this but it reads like there has been performance concerns with C# and store apps. I suppose it doesn't matter either way as even if it was it will soon become a problem of the past.

Another thing that made me do a happy dance and is worth a mention here is:

However, apps will get deployed on end-user devices as fully self-contained natively compiled code (when .NET Native enters production), and will not have a dependency on the .NET Framework on the target device/machine

At the risk of starting a language war, which let's be honest MS somewhat attracts in the first paragraph "This preview release of .NET Native offers you the performance of C++ with the productivity of C#. .NET Native enables the best of both worlds!", how does this change things? Although mono and things like xamarin exist, does .NET native and MS new direction mean .NET languages in the near future will be cross platform (naturally without mono) that perform just as good at C++?

There are a lot of quotes I removed because it was practically a copy paste, due to excitement, but this is something I feel worthy of staying here.

Because .NET Native uses the C++ optimizer to generate binaries it eliminates the need for an obfuscator in most cases.

Again I know this is for window store atm but I think it is safe to assume in the future this will be for all things .NET

In case no one has the initial blog posting: http://blogs.msdn.com/b/dotnet/archive/2014/04/03/the-next-generation-of-net.aspx Have a look at RyuJIT as well as other features

You continue to upload MSIL app packages to the Windows Store. Our compiler in the cloud compiles the app using .NET Native in the Store, creating a self-contained app package that’s customized to the device where the app will be installed.

Maybe I misunderstand, but this part sounds scary...

Sounds way too automagic for me... I'd like to at least be able to quickly turn around and throughly test the actual binary that will run on the device _before_ trying to publish it...

These extra automatic steps sounds like a nightmare the day you get (and you always do) some weird problem on some device you need to debug...

Advertisement

Yes, I'm surprised as well (I read this yesterday and mentioned it on a thread in the Direct3D forum). Personally, I'm really excited, provided Microsoft doesn't screw it up (they mentioned the preview is geared for Windows Store apps).

But, wait, I just saw this earlier which should make us ALL DO A HAPPY DANCE:

http://blogs.msdn.com/b/clrcodegeneration/archive/2014/04/03/ryujit-ctp3-how-to-use-simd.aspx

SIMD IS COMING FOR .NET!!!


does .NET native and MS new direction mean .NET languages in the near future will be cross platform (naturally without mono) that perform just as good at C++?

Define "cross platform". Having it be compiled on their cloud kind of implies that it will only work for Windows platforms. If that's all that you're concerned with, that's okay, but the news is not as exciting for others that still have to ensure that the game runs with good performance on platforms that don't have this tool available.

But, wait, I just saw this earlier which should make us ALL DO A HAPPY DANCE:

http://blogs.msdn.com/b/clrcodegeneration/archive/2014/04/03/ryujit-ctp3-how-to-use-simd.aspx

SIMD IS COMING FOR .NET!!!

Only 6 years after it came to Mono ;)

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

But, wait, I just saw this earlier which should make us ALL DO A HAPPY DANCE:

http://blogs.msdn.com/b/clrcodegeneration/archive/2014/04/03/ryujit-ctp3-how-to-use-simd.aspx

SIMD IS COMING FOR .NET!!!

Only 6 years after it came to Mono ;)

Yes, yes, but better late then never!

Advertisement


does .NET native and MS new direction mean .NET languages in the near future will be cross platform (naturally without mono) that perform just as good at C++?

Define "cross platform". Having it be compiled on their cloud kind of implies that it will only work for Windows platforms. If that's all that you're concerned with, that's okay, but the news is not as exciting for others that still have to ensure that the game runs with good performance on platforms that don't have this tool available.

Yes but as I stated and as it is mentioned in the FAQ:

Will Server/Desktop apps benefit from .NET Native and/or the Compiler in the Cloud?

Desktop apps are a very important part of our strategy. Initially, we are focusing on Windows Store apps with .NET Native. In the longer term we will continue to improve native compilation for all .NET applications.

It is a start to something more promising and desktop will likely get support. Whether that is in the same format that is yet to be determined

This is fantastic news for C#. MS are saying upto 60% faster startup times for apps and lower memory profile. But there wasn't any mention that I could find of actual performance benefits, although I expect there will be. We just might have to wait to get some figures.

As far as it coming to desktop. WinRT will eventually come to desktop anyway (as far as I can tell), so that puts a time-frame on it's availability, if we get WinRT for desktop in Windows 9.

Edit : I was also pretty happy to hear SharpDX mentioned in one of the MS posts on .NET Native. They are looking at libraries for real results, which is good to see. I'm optimistic this will be a very positive development for C# game dev.

.NET Native isn't the only awesome C# news to come out this week.

- The entire Roslyn compiler stack is open source: http://roslyn.codeplex.com/

- You can see all the raw design discussions the compiler team has around new language features, and play with the previews of some of them: https://roslyn.codeplex.com/wikipage?title=CSharp%20Language%20Design%20Notes&referringTitle=Documentation

- Microsoft has formed an organization that works with other companies and communities to open source huge parts of the .NET framework: http://www.dotnetfoundation.org/

- The brand new JITer (codenamed RyuJIT) has hit CTP3 and now supports SIMD! http://blogs.msdn.com/b/clrcodegeneration/archive/2014/04/03/ryujit-ctp3-how-to-use-simd.aspx

- All of the .NET Framework source code (core libraries, WPF, you name it) has been opened up for use as a reference: http://referencesource.microsoft.com/

Mike Popoloski | Journal | SlimDX
- All of the .NET Framework source code (core libraries, WPF, you name it) has been opened up for use as a reference: http://referencesource.microsoft.com/

That is huge.

This topic is closed to new replies.

Advertisement