linux gcc clang,gcc 编译器与 clang 编译器

msvc的有时候比g++的还慢很多

d:\>g++ p30m2.cpp -O2

d:\>cl p30m2.cpp -O2

用于 x86 的 Microsoft (R) C/C++ 优化编译器 17.00.51106.1 版版权所有(C) Microsoft Corporation。保留所有权利。

p30m2.cpp

Microsoft (R) Incremental Linker Version 11.00.51106.1

Copyright (C) Microsoft Corporation. All rights reserved.

/out:p30m2.exe

p30m2.obj

d:\>timer a

Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31

Start

146511208

472335975

534494836

912985153

[2066327172]

Kernel Time = 0.031 = 0%

User Time = 6.801 = 72%

Process Time = 6.832 = 73%

Global Time = 9.334 = 100%

d:\>timer p30m2

Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31

Start

146511208

472335975

534494836

912985153

[2066327172]

Kernel Time = 0.015 = 0%

User Time = 6.754 = 73%

Process Time = 6.770 = 73%

Global Time = 9.165 = 100%

d:\>g++ p14a1.cpp -O2

d:\>cl p14a1.cpp -O2

用于 x86 的 Microsoft (R) C/C++ 优化编译器 17.00.51106.1 版版权所有(C) Microsoft Corporation。保留所有权利。

p14a1.cpp

Microsoft (R) Incremental Linker Version 11.00.51106.1

Copyright (C) Microsoft Corporation. All rights reserved.

/out:p14a1.exe

p14a1.obj

d:\>timer a

Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31

maxstep=950 ,at 63728127

Kernel Time = 0.234 = 3%

User Time = 3.822 = 56%

Process Time = 4.056 = 59%

Global Time = 6.789 = 100%

d:\>timer p14a1

Timer 9.01 : Igor Pavlov : Public domain : 2009-05-31

maxstep=950 ,at 63728127

Kernel Time = 0.312 = 2%

User Time = 11.466 = 81%

Process Time = 11.778 = 83%

Global Time = 14.150 = 100%

lt  发表于 2016-11-27 21:07:49

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值