New Innovations in the .NET Runtime
description
Transcript of New Innovations in the .NET Runtime
Andrew Pardoe ([email protected])Program Manager, .NET Runtime
New Innovations in the .NET Runtime
.NET (A *Very* Simplified View)
Runtime Ecosystem
Languages Tools
Questions? Answers: http://blogs.msdn.com/b/dotnet
What are we hearing from you?Every company is becoming a software company.
Enterprise software needs to be innovative, agile and polished.
Line of business apps must be cross-device.
Open Source enriches the platform and the community.
Enterprises have existing applications to evolve and keep running.
.NET is open and community-driven
.NET skills transfer to many scenarios
.NET will continue to be relevant
Open
Productive
Innovative
Our investments in .NET
.NET
VS SDK
• .NET Framework 4.5.1 4.5.2• ASP .NET vNext and cloud-optimized .NET• Portable Class Libraries & Universal Apps• .NET Native• RyuJIT modern JIT compiler
Session overview
• Highly compatible, in-place update of .NET 4, 4.5
• Incorporates feedback from 4.5.1 release • 7 major features, 109 bug fixes• ASP.NET improvements• HostingEnvironment.QueueBackgroundWorkItem• HttpResponse.AddOnSendingHeaders • HttpResponse.HeadersWritten
• High DPI rendering improvements in Windows Forms controls DataGridView, ComboBox, ToolStripMenuItem, Cursor
• Distributed Transactions enhancements• More robust profiling APIs for better dependency injection• ETW-based tracking on a larger .NET Framework surface area• Improved activity tracing support
.NET 4.5.2 available for download
Share early and share often
.NET is .NET, everywhere
Your feedback drives our work
Open
Consistent
Feedback
.NET Ecosystem
• New, modular, modern web stack• Ships .NET Framework as part of your web
app• Servicing events limited to critical security
issues• “Cloud optimized” framework ships with
CoreCLR
ASP .NET vNext
Making your .NET knowledge more valuable Shipping APIs across platforms on NuGet
Improved options for sharing code
Feedback-driven
• Shipping faster and across more platforms with NuGet• Problems:• Support • Discoverability
• Not every core API is portable across platforms (e.g., file)
• Portable Class Libraries improved for scalable, cross-device sharing• Universal Projects enable sharing of source and assets
• Shipping much more often• Make changes due to UserVoice and bug reports • Using light-weight public previews to collect feedback
http://visualstudio.uservoice.com
http://visualstudio.uservoice.com
• Microsoft NuGet packages and Portable Class Libraries (PCLs) are licensed to work cross-platform
• PCLs work in Visual Studio Express & Xamarin tools
Sharing is good
• Portable Class Libraries can depend on WinRT APIs
• PCLs can be exposed to other languages as WinMD
• WinRT is converging across Windows platforms
• Increasing the set of APIs available on all platforms
Sharing more is better
• Share source & assets between Windows 8.1 and Windows Phone 8.1 platforms
• You can even share XAML UI in the designer• Share your project directly—no need to
create Portable Class Library binaries• Create an app for both platforms from one
project
Universal Windows Apps
Conditional constants…#if WINDOWS_PHONE_APP Windows.Phone.UI.Input.HardwareButtons.BackPressed += this.HardwareButtons_BackPressed;#endif
…drive IntelliSense, syntax highlighting, emulators, etc.
Universal Windows Apps
• Completely new browsing experience with search and navigation powered by Rosyln
• Hyperlinked source code• Browsing features include
• Go to definition• Find references• Highlight references• Document Outline• Project Explorer• Namespace Explorer
http://SourceOf.net Step through .NET Framework sources when debugging your code
Browse .NET Framework source code online
• Continued investment in full .NET Framework
• ASP .NET vNext and a cloud-optimized .NET• Portable Class Libraries & Universal Apps• .NET Native• RyuJIT modern JIT compiler
Session overview
.NET code generation: A primer
Source code(C#/VB/F#)
MSIL bytecode Machine code
C#/VB/F# compiler
Code generation
Code generation is done either….• Lazily at runtime with a Just-In-Time, or JIT, compiler• Optimistically at build time with NGen, Triton or .NET Native
.NET Code Execution today
C++ PerformanceSelf-contained apps
Dynamic experience“Unlimited” class libraries
• Next Generation Compiler in the Cloud builds upon Triton for Windows Phone
• Apps compiled with .NET Native start up to 60% faster and use ~25% less memory
• Developer Preview available at http://aka.ms/dotnetnative
.NET Native (Project N)
Scenario Improvement (%)Cold Startup 39.32%Warm Startup 31.21%Memory Usage 12.68%
Wordament on .NET Native:
Visual Studio Experience for .NET NativeEnable .NET Native for your project
Debug and test your app with .NET Native
A compiler’s performance is measured in two ways:• Throughput measures how fast a compiler
generates app code. Because a JIT compiler runs before user code throughput dominates startup.
• Code quality measures how fast the generated code runs. Code quality matters most in a long-running process where code is JIT compiled once and run for a long time.
• 32-bit JIT emphasizes throughput over code quality
• 64-bit JIT emphasizes code quality over throughput
Just-In-Time (JIT) compilation
RyuJIT performance
CTP3 vs JIT64, code quality
• RyuJIT is based on JIT32 for fast throughput• RyuJIT brings optimizations from JIT64 for
great code quality• Having one JIT codebase means faster
innovation• First new feature: SIMD in CTP3• More new features to come including x86 & ARM support
• Try out CTP3 today: http://aka.ms/RyuJIT
RyuJIT is a modern JIT compiler
We would love to hear from you!
@dotnet
dotnetBlog E-mail
UserVoiceMSDN Forums