5. RyuJIT + SIMD
Garbage Collector
Runtime components Compilers
.NET Compiler Platform (Roslyn)
Languages innovation
.NET Framework 4.6
Fully-featured and integrated
.NET libraries and runtime for Windows
Modular and optimized
.NET libraries and runtimes
Base class libraries
NuGet packages
Libraries
10. 기능
WPF 투명 차일드 윈도우 지원
WPF 터치 동작에 대한 성능과 신뢰성 개선
멀티 터치 이벤트에 대하여 신뢰성 개선
UI 스레드가 바쁜 상황에서도 터치 동작이 원할 하도록 성능 개선
WPF 리스트에 대한 스크롤 가상화 개선
리스트상에 포함된 항목 조회의 신뢰성 향상
가상화 중에 레이아웃이 훼손되지 않도록 개선
WPF High DPI 지원 개선
다중 DPI 커서와 모니터 지원, 프레임워크 요소들에 대한 외곽 처리 개선
윈폼 High DPI 지원 개선
11. 라이브러리
WCF 개선
기존 SSL 3.0, TLS 1.0 지원에 TLS 1.1, TLS 1.2 지원 추가
다수의 HTTP 연결을 통해 메시지 전송
ADO.NET 개선
SQL Server 2016에서 사용할 수 있는 Always Encrypted 기능 지원
Async
비동기 제어 흐름상에서 특정 데이터를 유지할 수 있는 기능 추가
Network 관련 타입 개선
System.Net.Sockets, System.Uri 개선
암호화 관련 라이브러리 개선
12. 런타임
64비트 JIT 컴파일러 재작성(“RyuJIT”)
대용량의 64비트 클라우드 작업을 수행하기에 적합
64비트 CLR의 SIMD 지원
SSE2, AVX 등의 하드웨어를 지원
하드웨어 중립적인 코드 작성이 가능
가비지 수집기 개선
피닝(pinning)된 객체 최적화
Gen1에서 Gen2로의 프로모션을 메모리 효율적으로 수행하도록 개선
가비지 수집 금지 영역 지정
어셈블리 로더 성능 개선
13. 도구
새로운 Blend
솔루션 탐색기, 팀 탐색기, 편집기 등의 VS 기술을 결합
Roslyn 기반의 새로운 언어 서비스
속도와 신뢰성 개선
코드 중심의 워크스페이스, WPF의 In-Place 편집
디버깅
Xaml UI 디버깅 도구, 디버거가 결합된 분석 도구
분석
타임라인 기반 분석 도구
15. 참고자료
Announcing .NET Framework 4.6
http://blogs.msdn.com/b/dotnet/archive/2015/07/20/announcing-net-framework-4-6.aspx
.NET Framework의 새로운 기능
https://msdn.microsoft.com/library/ms171868.aspx#v46
NET Framework 4.6의 응용 프로그램 호환성
https://msdn.microsoft.com/library/dn833127.aspx
.NET Framework 4.6 list of changes
https://github.com/Microsoft/dotnet/blob/master/docs/releases/net46/dotnet46-changes.md
.NET Framework API diff
https://dotnet2015.blob.core.windows.net/changes/diff_net452_net46.html
.NET Framework Targeting Pack
http://www.microsoft.com/ko-kr/download/details.aspx?id=48136
Web installer(preferred)
http://www.microsoft.com/ko-kr/download/details.aspx?id=48130
Offline installer
http://www.microsoft.com/ko-kr/download/details.aspx?id=48137
18. RyuJit?
• .NET을 위한 차세대 64비트 JIT 컴파일러
• 코드 생성 속도 개선, 코드 품질 개선
• 고급 최적화 기능 포함(e.g. SIMD, …)
코드 품질
How fast generated code runs
코드 생성 속도
How fast JIT compiler generate app code
19. SIMD(Single Instruction Multiple Data)
• .NET에서 data parallelism을 사용할 수 있도록 함
• 게임, 수식 연산, 이미지 처리 등의 응용 프로그램의 성능을 개선
• nuget을 이용하여 .NET 라이브러리 형태로 이용 가능
20. Vector<int>.Count
var v1 = new Vector<int>(src1, i);
var v2 = new Vector<int>(src2, i);
var sum = v1 + v2;
sum.CopyTo(dest, i);
29. public class Customer
{
public string First { get; set; } = "Jane";
public string Last { get; set; } = "Doe";
}
Initializers for auto-properties(C# 6.0)
Getter-only auto-properties(C# 6.0)
public class Customer
{
public string First { get; } = "Jane";
public string Last { get; } = "Doe";
}
30. Expression bodies on method-like members(C# 6.0)
public Point Move(int dx, int dy) => new Point(x + dx, y + dy);
public static Complex operator +(Complex a, Complex b) => a.Add(b);
public void Print() => Console.WriteLine(First + " " + Last);
public string Name => First + " " + Last;
public Customer this[long id] => store.LookupCustomer(id);
Expression bodies on property-like function members(C# 6.0)
String interpolation(C# 6.0)
var s = $"{p.Name} is {p.Age} year{{s}} old";
var s = $"{p.Name} is {p.Age} year{(p.Age == 1 ? "" : "s")} old";
31. using static System.Console;
using static System.Math;
using static System.DayOfWeek;
class Program
{
static void Main()
{
WriteLine(Sqrt(3 * 3 + 4 * 4));
WriteLine(Friday - Monday);
}
}
using static(C# 6.0)
32. int? length = customers?.Length; // null if customers is null
Customer first = customers?[0]; // null if customers is null
int length = customers?.Length ?? 0; // 0 if customers is null
Null-conditional operators(C# 6.0)
nameof expressions(C# 6.0)
if (x == null) throw new ArgumentNullException(nameof(x));
WriteLine(nameof(person.Address.ZipCode)); // prints "ZipCode"
Exception filters(C# 6.0)
try { … }
catch (MyException e) when(myfilter(e)) {}
33. Index initializers(C# 6.0)
var numbers = new Dictionary<int, string>
{
[7] = "seven",
[9] = "nine",
[13] = "thirteen"
};
try { res = await Resource.OpenAsync(…); }
catch (ResourceException e)
{ await Resource.LogAsync(res, e); }
finally { if (res != null) await res.CloseAsync();}
await in catch and finally blocks(C# 6.0)
35. Pattern Matching
if (o is Point p && p.X == 5) { WriteLine(p.Y); }
if (o is Point{ X is 5, Y is var y }) { WriteLine(y); }
if (o is Point(5, var y)) { WriteLine(y); }
switch (o)
{
case string s:
WriteLine(s);
break;
case Point(int x, int y):
Console.WriteLine($"({x},{y})");
break;
case null:
Console.WriteLine("<null>");
break;
}
36. Tuple
public (int sum, int count) Tally(IEnumerable<int> values) { … }
var t = Tally(myValues);
Console.WriteLine($"Sum: {t.sum}, count: {t.count}");
public async Task<(int sum, int count)> TallyAsync(IEnumerable<int> values) { … }
var t = await TallyAsync(myValues);
Console.WriteLine($"Sum: {t.sum}, count: {t.count}");
public (int sum, int count) Tally(IEnumerable<int> values)
{
var s = 0; var c = 0;
foreach (var value in values) { s += value; c++; }
return (s, c);
}
37. nullable references
Dog? nullableDog = new Dog("Nullable");
nullableDog.Bark(); Compiler Error – nullable 참조로는 dereference 하지 못함
cannot dereference nullable reference(yet)
if (nullableDog != null)
{
// 컴파일러는 이 scope 내에서는 nullableDog가 null이 아님을 안다.
nullableDog.Bark(); // OK
}
else
{
// 컴파일러는 이 scope 내에서는 nullableDog가 null임을 안다.
nullableDog.Bark(); // Compiler Error – nullable 참조로는 dereference하지 못함
}
38. Non-nullable references
Dog! mandatoryDog = new Dog("Mandatory");
mandatoryDog.Bark(); // OK – null 일 수 없으므로 method 호출 가능
string name = mandatoryDog.Name; // OK – null 일수 없으므로 property 참조 가능
48. Mono.NET Core 크로스 플랫폼
모바일 개발과
.NET/Xamarin 파트너쉽
.NET
Xamarin
Unity
서비스와 웹 응용 프로그램 모바일 앱
Windows Linux Mac OS X
.NET Core
ASP.NET 5
49. 64-bit JIT + SIMD
Garbage Collector
Runtime components Compilers
.NET Compiler Platform (Roslyn)
Languages innovation
.NET Framework 4.6 .NET Core 5
Fully-featured and integrated
.NET libraries and runtime for Windows
Modular and optimized
.NET libraries and runtimes
Base class libraries
NuGet packages
Libraries
50. • 리눅스 환경에서도 .NET 기반의 앱과 서비스를 수행
• 리눅스 환경에서 구동되는 .NET 기반의 앱을 Visual Studio를
이용하여 개발, 배포, 디버깅 수행
• OSX 사용자는 Visual Studio Code 등을 이용하여 Mac에서 .NET
code를 편집, 컴파일, 디버깅
• .NET Core 전체가 GitHub를 통해 오픈소스로 제공
개발자를 위한 이점
53. SSCLI (“Rotor”)
Mar 2002
WiX
Apr 2004
F#
May 2005
ASP.NET
Mar 2012
TypeScript
Oct 2012
Roslyn
Apr 2014
.NET Core
Nov 2014
Mono V1
Jun 2004
Mono
Started
~2002
54. .NET의 오픈 소스화
플랫폼
크로스 플랫폼 지원
오픈소스
RyuJIT, SIMD
Core-CLR
Runtime
components
Compilers
.NET Compiler Platform
(“Roslyn”)
Languages
.NET Core 5 Libraries
.NET Framework 4.6 Libraries
Libraries
.NET
Framework 4.6
.NET
Core 5
github.com/microsoft/dotnet
What is Microsoft open sourcing? (2015)
55. .NET API for Hadoop WebClient
.NET Compiler Platform ("Roslyn")
.NET Map Reduce API for Hadoop
.NET Micro Framework
ASP.NET MVC
ASP.NET Web API
ASP.NET Web Pages
ASP.NET SignalR
MVVM Light Toolkit
.NET Core 5
Orleans
MEF (Managed Extensibility Framework)
OWIN Authentication MiddlewareRx (Reactive Extensions)
Orchard CMS
Windows Azure .NET SDK
Thinktecture IdentityManager
WnsRecipe
Mimekit Xamarin.Auth
Xamarin.Mobile
Couchbase for .NET
Meet the people behind the .NET Foundation
http://www.dotnetfoundation.org/teamhttp://www.dotnetfoundation.org
@dotnetfdn
Mailkit
System.Drawing
ASP.NET 5
Salesforce Toolkits for .NET
NuGetKudu
Cecil
MSBuild
57. 감사합니다.
• MSDN Forum http://aka.ms/msdnforum
• TechNet Forum http://aka.ms/technetforum
Editor's Notes
Announcing .NET Framework 4.6
.NET Framework의 새로운 기능
https://msdn.microsoft.com/library/ms171868.aspx#v46
.NET Framework 4.6의 응용 프로그램 호환성
https://msdn.microsoft.com/library/dn833127.aspx
.NET Framework 4.6 list of changes
https://github.com/Microsoft/dotnet/blob/master/docs/releases/net46/dotnet46-changes.md
.NET Framework API diff
https://dotnet2015.blob.core.windows.net/changes/diff_net452_net46.html
.NET Framework Targeting Pack
http://www.microsoft.com/ko-kr/download/details.aspx?id=48136
Web installer(preferred)
http://www.microsoft.com/ko-kr/download/details.aspx?id=48130
Offline installer
http://www.microsoft.com/ko-kr/download/details.aspx?id=48137
Demo 시연
Demo 시연
Demo 시연
개발자는 개발시에 준 컴파일러 개발도구는 개발자를 더 잘 이해할 필요가 있다. 이를 위해서 개발 도구는 컴파일러를 이해해야 한다.
Demo 시연
Demo 시연
Cold Startup 40% 빨라지고, Memory Usage는 13% 정도 개선
Tailored to Mobile and Client
Desktop .NET is designed for a variety of client, server, and enterprise scenarios.
1.8 billion machines use Desktop .NET and it’s deployed as part of the OS.
.NET needs to run on phones and smaller. .NET Native has a small footprint.
Updates Don’t Break Developers
.NET Native statically links framework libraries with the application.
Apps adopt library innovations on their cadence.
Library innovations are delivered consistently across all devices.
Developers can be confident that Windows Update won’t break their app.
Better Optimizations
JIT-ing has to happen quickly. Optimized compiling doesn’t.
Moving all compilation steps to build time allows us to implement better optimizations.
We now use the C++ backend. T
New runtime mrt.dll(MR.T) 300K로 줄였다. CLR 6M가 넘는다.
Why store app : scope,
Desktop .NET은 NET의 usage scenari가 매우 복잡하고 많다. 다 할 수가 없다. 그래서 Win Store App 먼저..
하지만 멈추지 않을 것이다. Command line이나 WPF 응용 프로그램 등으로 확장 될 것이다.
.NET Deployment와 상관이 없다.
단일의 binary/ 더 이상 .net 을 설치할 필요가 없다. Runtime 조차도 xcopy로 복사
No JIT, S아 released
Static compilication of your .NET code
C++ compiler back end in order to generate MDIL
Machine Dependent IL -- > Native binary
Trident on windows phone, not need to load jit
JIT x64,32bit, arm. C# doesn’t are
MDIL binary that go on device and then the native major
C++ excellect optimization
No JIT, little bit of JIT, Jit can be useful(runtime compilation)
No JITing이 핵심은 아니다. .NET nativ는 단지 핵심적으로 성능과 관련된 여러가지 작업들을 수행했다.
Startup 시간은 최대 60% 빨라지고, 평균 40%정도 빨라진다.
이는 ngen이나 Trident
CLR runtim도 최적화 하였다. MRt100.dll minimum runtime static compile global 분석, global optimizatio을 수행, refactored and optimized libraries frame refactored and again optimized to make sure that app runs faster,
Today focus on store app for modern windows app for now
Tool Chain
C# code ->csc.exe->app.exe->ilc.exe(<-corefx.dll, not the same implementation but same framework, optimized winrt framework)
Ilc.exe has bunch of steps
MCG(Marshing Code Generation) -> g.cs 가 MCG로 들어간다. 다음으로 IL Transform->app.ildll ->Tree shaking UGC backend->MDIL(app.mdil)->rhbind
-> app.exe, app.dll
Windows Phone world. Compliation is happed cloud.
Windows Phone compiler doing(Mdil COMPILER)
Reflection is not allowed