我没想到! [英] I wasn't expected that !

查看:80
本文介绍了我没想到!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很长一段时间以来,我一直是带有VCL框架的Borland C ++ Builder的粉丝,自从我见过MFC以来,从来没有再看过微软的产品。无论如何,最近Borland决定放弃它的C ++ Builder,我决定使用
来查看.NET C ++和.NET C#产品。在简单地使用它们之后,我将它们用于测试某些浮点任务中的每个其他的b $ b。结果可能会让你大吃一惊。这当然让我感到惊讶!


亲眼看看:

http://mywebpages.comcast.net/marche...nchmark_01.htm


杰克

For a long time I was a gib fan of Borland C++ Builder with VCL framework and never gave a second look in Microsoft
products since I''ve seen MFC. Anyway, recently Borland decided out of the blue to abandon it''s C++ Builder and I decided
to give a look into the .NET C++ and .NET C# products. After briefly playing with them I put them to test against each
other in some floating point tasks. The outcome might surprise you. It certainly surprised me !

See for yourself:

http://mywebpages.comcast.net/marche...nchmark_01.htm

Jack

推荐答案

Marchel写道:
Marchel wrote:
很长一段时间我都是带有VCL的Borland C ++ Builder的gib粉丝
自从我见过MFC以来,我从未对微软产品进行过第二次审视。无论如何,最近Borland决定放弃它的C ++ Builder,我决定看一下.NET的C ++和.NET C#产品。在简单地玩它们之后,我把它们放在一些浮点任务中相互测试。结果可能会让你大吃一惊。这当然让我感到惊讶!

亲眼看看:

http://mywebpages.comcast.net/marche...nchmark_01.htm
For a long time I was a gib fan of Borland C++ Builder with VCL
framework and never gave a second look in Microsoft products since
I''ve seen MFC. Anyway, recently Borland decided out of the blue to
abandon it''s C++ Builder and I decided to give a look into the .NET
C++ and .NET C# products. After briefly playing with them I put them
to test against each other in some floating point tasks. The outcome
might surprise you. It certainly surprised me !

See for yourself:

http://mywebpages.comcast.net/marche...nchmark_01.htm




R: \> cl -O2 -EHs -Op fpbench1.cpp

Microsoft(R)32位C / C ++优化编译器版本13.10.3077(适用于80x86)


fpbench1.cpp

Microsoft(R)增量链接器版本7.10.3077

版权所有(C)Microsoft公司。保留所有权利。


/out:fpbench1.exe

fpbench1.obj


R:\> ; cl -O2 -EHs -Op fpbench2.cpp

Microsoft(R)32位C / C ++优化编译器版本13.10.3077(适用于80x86)


fpbench2.cpp

Microsoft(R)增量链接器版本7.10.3077

版权所有(C)Microsoft公司。保留所有权利。


/out:fpbench2.exe

fpbench2.obj


R:\> ; fpbench1

10000000 3.1415927035898 0.250

20000000 3.1415926785905 0.500

30000000 3.1415926702568 0.735

40000000 3.1415926660896 0.984

50000000 3.1415926635893 1.250

60000000 3.1415926619226 1.485

70000000 3.1415926607317 1.734

80000000 3.1415926598387 1.984

90000000 3.1415926591444 2.235


R:\> fpbench2

10000000 3.1415927035898 0.250

20000000 3.1415926785905 0.500

30000000 3.1415926702568 0.750

40000000 3.1415926660896 1.000

50000000 3.1415926635893 1.234

60000000 3.1415926619226 1.500

70000000 3.1415926607317 1.735

80000000 3.1415926598387 2.000

90000000 3.1415926591444 2.250


此代码似乎对-Op改善浮动点

一致性非常敏感。选项。事实上,当我在没有-Op的情况下编译你的两个样本时,

我的每个案例都报告了0.000次!


-cd



R:\>cl -O2 -EHs -Op fpbench1.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

fpbench1.cpp
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/out:fpbench1.exe
fpbench1.obj

R:\>cl -O2 -EHs -Op fpbench2.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

fpbench2.cpp
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

/out:fpbench2.exe
fpbench2.obj

R:\>fpbench1
10000000 3.1415927035898 0.250
20000000 3.1415926785905 0.500
30000000 3.1415926702568 0.735
40000000 3.1415926660896 0.984
50000000 3.1415926635893 1.250
60000000 3.1415926619226 1.485
70000000 3.1415926607317 1.734
80000000 3.1415926598387 1.984
90000000 3.1415926591444 2.235

R:\>fpbench2
10000000 3.1415927035898 0.250
20000000 3.1415926785905 0.500
30000000 3.1415926702568 0.750
40000000 3.1415926660896 1.000
50000000 3.1415926635893 1.234
60000000 3.1415926619226 1.500
70000000 3.1415926607317 1.735
80000000 3.1415926598387 2.000
90000000 3.1415926591444 2.250

This code appears to be very sensitive to the -Op "Improve floating point
consistency" option. In fact, when I compiled your two samples without -Op,
I got times of 0.000 reported for every case!

-cd


Marchel写道:
Marchel wrote:
亲自看看:

http://mywebpages.comcast.net/marche...nchmark_01.htm




非常有趣!但是,在选择工具方面存在更多变量,而不是原始速度。大多数Windows应用程序都没有进行数字运算,但

花费所有时间等待用户做某事。


也许您应该考虑其他功能,如轻松使用,

便携性等等。我并不是说Borland必须做得更好 - 我认为你的测试需要更广泛的范围。让我们不要

忘记确定性清理 - 对于除了记忆之外的其他资源至关重要

IMV,通常也是记忆。


很可惜Borland正在放弃VCL。它已经有了好几年的时间才能成为一个优秀的图书馆,而.NET图书馆仍然是,恕不另行,恕不另行,b $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $。这些天怎么老安德斯呢?

Arnold the Aardvark



Very interesting! But there are far more variables in choice of tools
than raw speed. Most Windows applications are not number-crunching but
spend all their time waiting for the user to do something.

Perhaps you should consider other features such as ease of use,
portability, etc. I''m not claiming that Borland would necessarily do
better - I just think your tests need a wider scope. And let''s not
forget deterministic cleanup - vital for resources other than memory
IMV, and often memory, too.

It''s a great pity that Borland are ditching the VCL. It has had years
to mature into an excellent library, whereas the .NET library is still,
IMHO, in it''s infancy. How is old Anders these days, anyway?
Arnold the Aardvark


" Arnold the Aardvark" < no@way.com>在留言新闻中写道:c0 ****************** @ news.demon.co.uk ...
"Arnold the Aardvark" <no@way.com> wrote in message news:c0******************@news.demon.co.uk...
非常有趣!但是,在选择工具方面存在比原始速度更多的变量。大多数Windows应用程序都没有进行数字处理,而是花费所有时间等待用户做某事。

也许你应该考虑其他功能,如易用性,可移植性我并不是说Borland一定会做得更好 - 我只是认为你的测试需要更广泛的范围。让我们不要忘记确定性的清理 - 对于除了记忆之外的资源至关重要IMV,而且往往也是记忆。

很可惜Borland正在放弃VCL。它有多年成熟为一个优秀的图书馆,而.NET库仍然是,恕我直言,它处于初期阶段。无论如何,这些天老安德斯怎么样?

Arnold the Aardvark
Very interesting! But there are far more variables in choice of tools
than raw speed. Most Windows applications are not number-crunching but
spend all their time waiting for the user to do something.

Perhaps you should consider other features such as ease of use,
portability, etc. I''m not claiming that Borland would necessarily do
better - I just think your tests need a wider scope. And let''s not
forget deterministic cleanup - vital for resources other than memory
IMV, and often memory, too.

It''s a great pity that Borland are ditching the VCL. It has had years
to mature into an excellent library, whereas the .NET library is still,
IMHO, in it''s infancy. How is old Anders these days, anyway?
Arnold the Aardvark




我本来不想测试任何其他东西,而是速度。我同意你的意见,还有很多其他的选择可以选择

特定的语言。根据我的个人经验,大多数工程师为小型项目选择BASIC。为ocassional程序员选择

特定语言通常是由他们与

编程世界的个人基本和非常有限的联系所驱动的。我主要是为自己做了测试,但想与其他人分享我的经验。在我的情况下,你可以说b $ b,我有速度的痴迷:-)


JM



I did not intended to test anything else, but speed. I agree with you, that there are many other resons to choose
particular language. In my personal experience, most of the engineers choose BASIC for small projects. The choice of the
particular language for ocassional programmers is often driven by their personal basic and very limited contact with the
programming world. I did the test mostly for myself but wanted to share my experience with others. In my case, you can
say, I have speed obsession :-)

JM


这篇关于我没想到!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆