35
@himskim

VS2015 C++ new features

  • Upload
    -

  • View
    18

  • Download
    1

Embed Size (px)

Citation preview

Page 1: VS2015 C++ new features

@himskim

Page 3: VS2015 C++ new features

VS 2015? 좋겠죠근데 우린 못바꿔요

Page 4: VS2015 C++ new features

백만스물두

Page 5: VS2015 C++ new features
Page 6: VS2015 C++ new features

• Native Multi-targeting

• Round-tripping

Page 7: VS2015 C++ new features

https://msdn.microsoft.com/ko-kr/library/dn986839.aspx

Page 8: VS2015 C++ new features

Development Cycle

Page 9: VS2015 C++ new features

Edit

Build

Debug

Page 10: VS2015 C++ new features

Refactoring

Code generation

Quick Fixes

Intellisense

Page 11: VS2015 C++ new features

https://visualstudiogallery.msdn.microsoft.com/

Page 12: VS2015 C++ new features
Page 13: VS2015 C++ new features
Page 14: VS2015 C++ new features

Demo

Page 15: VS2015 C++ new features

Edit

Build

Debug

Page 16: VS2015 C++ new features

"Within C++ is a smaller, simpler, safer language struggling to get out.“

- Bjarne Stroustrup

Page 17: VS2015 C++ new features

Major design decision

Page 18: VS2015 C++ new features

C+

+1

7

constexpr Expression SFINAE Two-phase lookup

Variable templates Extended constexpr

NSDMI for aggregates

coroutines modules concepts Nested namespace Folded expressions

Page 19: VS2015 C++ new features

Compile Fast & Link Fast

Generate Fast & Secure Code

Page 20: VS2015 C++ new features

• 더욱빨라진 Whole Program Optimized builds

Page 21: VS2015 C++ new features

• 링커개선및신규옵션제공680

138

84

573

68

61

8

327

K I N E C T S P O R T S R I V A L ( X B O X O N E ) F O R Z A ( X B O X O N E ) D E S T I N Y ( X B O X O N E ) C H R O M E

CLEAN LINK TIMES WITH VS2015 (SEC)

VS2013 RTM VS2015 RTM

• /Debug:fastlink

• /Zc:inline

• Incremental linking for static libraries

• Linker multi-threading

VS2015 링커신규옵션

Page 22: VS2015 C++ new features

Vectorization of control-flow / Bit-test merging

void blackscholes(float* input, int *signArray, int n) {

for (int i = 0; i < n; i++) {float InputX = input[i];int sign;if (InputX < 0.0f) {

InputX = -InputX;sign = 1;

} else {sign = 0;

}input[i] = InputX;signArray[i] = sign;

}}

mask = InputX < 0.0f ? 0xFFFFFFFF : 0;InputX = (mask & -InputX) | (~mask & InputX);sign = (mask & 1) | (~mask & 0);

Branch를제거하여최적화된코드

벤치마크 테스트 결과

300%+ 속도 개선

Page 23: VS2015 C++ new features

• Loop-if unswitching

for (int i = 0; i < 100; i++)if (some_invariant_condition)

...

Source code:

if (some_invariant_condition)for (int i = 0; i < 100; i++)

...

Optimized as if:

Page 24: VS2015 C++ new features

• 그외

Page 25: VS2015 C++ new features

• /Guard:cf –새로운컴파일스위치

Page 26: VS2015 C++ new features

• Intel Memory Protection Extension(MPX) 지원

Page 27: VS2015 C++ new features

Incredibuild and Visual Studio

6:32

4:42

0:47

Visual Studio IncrediBuild(Predicted)

IncrediBuild(With Helpers*)

Ace open source 빌드벤치마크

일반적으로 10% 이상빌드속도개선

Page 28: VS2015 C++ new features

• 독립설치가능한 compiler, libraries, scripts

• Standalone Compiler

• Visual Studio Code

- ext install cpptools

• Team Build Server

• Python/Node.js/Rust

독립 Visual C++ Build 도구지원http://landinghub.visualstudio.com/visual-cpp-build-tools

Page 29: VS2015 C++ new features

Demo

Page 30: VS2015 C++ new features

Edit

Build

Debug

Page 31: VS2015 C++ new features

• Set next statement

• PerfTips

• Integrated CPU Profiling

• Integrated Memory Profiling

Page 32: VS2015 C++ new features

Demo

Page 34: VS2015 C++ new features
Page 35: VS2015 C++ new features