Escolar Documentos
Profissional Documentos
Cultura Documentos
memory
_yield and _await
Coroutine
generator<int> fib(int n)
{
int a = 0;
int b = 1;
while (n-- > 0) int main() {
{ for (auto v : fib(35))
yield a; {
auto next = a + b; printf("%d\n", v);
a = b; if (v > 10)
b = next; break;
} }
} }
Execution generator<int> fib(int n)
EDIT BUILD
CLEAN BUILD
DEBUG
600
500
400
300
225
200
138
120
100
68 61
34
10
0
KSR (Xbox One) Forza (Xbox One) Chrome VC Compiler
Incremental Whole Program (Fast LTCG)
Incremental Scenario (LTCG), E2E Build Time (sec)
13
C2
129
87
MSHTML
140
220
DXAML
240
int bar() {
// Other stuff
}
// ...
Only 1 function recompiled !!
CIL Full Build Edited Incremental Build
CIL
.obj .obj
link.exe link.exe
exe/dll exe/dll
13
Chrome (Inc)
228
492
Chrome (F)
1023
68
Epoch
620
18
Ogre3d
34
1.13
Auto7
1.08
250
200
150 124
85
100
50 11
0
Destiny Chrome Kinect Sports Rival
Seen bigs wins (10-20%) for many big Xbox One titles (Forza, Kinect Sports Rival, Fable Legends and more).
Forza receives a 14% improvement on Game thread, and 4% gain on render thread on top of LTCG.
C/C++
Code Generation
C2.dll
linker binder
.EXE .DLL
C/C++ C# (MSIL)
Code Generation
C2.dll
linker binder
.EXE .DLL
STL
Framework-1 BOOST .Net Native Framework
WinRT Class Library
STL
Framework-1 BOOST .Net Native Framework
WinRT Class Library
.exe
.exe
C/C++
C/C++
.exe
.exe
C++ C++
C++
CLANG CLANG
clang AST -> LLVM IR -> c2.dll tuples
Builds with Builds with
C1xx/C2 C1xx/C2
Windows-specific compiler compiler Windows-specific
code code
Ifdef for
Windows
Ifdef for
Windows Ifdef for
Windows Upgrade to
VS2015 +
Update
Shared C++ Library Shared C++ Library
Builds with
C1xx/C2
compiler
Builds with
Builds with Clang/C2 and
Windows
Clang/LLVM
Build to
Clang/LLVM
Windows
Build to
Android
template<typename T>
const T limits::min = { };
#ifndef _MSC_VER
#ifdef _MSC_VER
#ifdef _MSC_VER
#ifdef _MSC_VER
#if defined(_MSC_VER)
C
C++ no templates
C++ <templates>s