How to find out which optimizations are performed automatically by my compiler

I looked at this link. Will it be optimized and wondered how we can know which optimizations are performed by a particular compiler.

Like VC8.0 convert if-else statements to switch-case? Is such information available in msdn?

+3
source share
7 answers

Since everyone seems to be keen to tell the OP that he should not worry about this, there are some useful, albeit not as specific as the requested OP) compiler optimization information (parameters).

, , MSVC Intel ( GCC -O2), :

, , .

+3

, .

+1

, , . , , .

0

VC8.0, , . , , , LLVM. , -, C , , , . , , , , , , .

0

VC8.0 if-else switch-case?

. , ? , , - , . , .

: switch-case , . , .

0

, , , , , .

, ( ) , . , , . , - , . / , , if/else case-switch.

0

, "convert if/else to switch/case". switch/case.

switch/case. , .

if/else, , , , . , , , , . , .

IIRC, GCC , , . , "" . , (, ).

, , . , V8, V9 V10.

0

Source: https://habr.com/ru/post/1756160/


All Articles