速度问题 [英] speed issues

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

问题描述

我正在试图决定是否需要转移到另一个

开发工具,而且我被告知VB6代码,如果写得好,可以是10个/ br / >比bb.net快
倍,但如果写得不好,它可能会慢十倍。这是正确的吗?


我非常有能力自己编写代码,所以我的大部分代码都写得很好,我写的很好如果写得好VB6,我想转移到vb.net

代码快10倍。我被告知了真相吗?或者我需要进一步看看

吗?


Mike

解决方案

< blockquote>嗨Mike,


很高兴看到你考虑VB.NET。 VB.NEt中的优化代码将通过VB6中的优化代码运行很多b $ b。问题是编写和维护是多么困难,你需要额外的功能吗?这些是您应该关注.NET的原因。
注意:简单的应用程序(单层,少数组件)将有更大的启动
$ b与VB6相比,.NET中的$ b命中率,但是一旦超过初始加载.NET应用程序

通常会更有效地分配对象。一个典型的例子是一个运行时间很长的服务器应用程序,其中.NET GC管理使其非常强大且可以扩展。

另一个原因你可能想要考虑.NET适用于64位应用程序。


但是就实际速度而言,当所有这些都说完了之后,对于简单的b
操作他们两者最终都成为了X86的运营。我写了比C ++应用更快的VB6

应用程序,直到他们让我修复了C ++代码的b $ b;如果你有性能关键代码,你可以在VB6或.NET中同等地使用


" Mike Williams" < mi *** @ whiskyandCoke.com写信息

news:eu ************** @ TK2MSFTNGP05.phx.gbl ...


我正在试图决定是否需要转移到另一个
开发工具而且我被告知VB6代码,当时写得好,可以比vb.net快十倍b / b,但是如果它编写得很糟,那么它可能会慢十几美元。这是正确的吗?


我非常有能力自己编写代码,所以我的大部分代码都写得很好,我写的很好如果写得好VB6,我想转移到vb.net

代码快10倍。我被告知了真相吗?或者我需要进一步看看

吗?


Mike

" Bill McCarthy" < Bi ** @ N0SPAM.com写信息

新闻:41 **************************** ****** @ microsof t.com ...


嗨Mike,很高兴看到你考虑VB.NET。 VB.NEt中的优化

代码将在VB6中使用优化的

代码运行很多。



好​​的。谢谢比尔。所以你会说声明写得好的VB6

代码可以比vb.net运行快十倍是一个完全有效的

声明,还是你认为它会产生误导?


我只是被告知有人认为他/ b $ b知道这些事情以及谁用这两种工具编写程序而且我想知道他是否故意制造误导性陈述?你觉得怎么样?b $ b?那里的其他人怎么想呢?我被误导了吗?


迈克




" Mike Williams" < mi *** @ whiskyandCoke.com写信息

新闻:eG ************** @ TK2MSFTNGP04.phx.gbl ...


" Bill McCarthy" < Bi ** @ N0SPAM.com写信息

新闻:41 **************************** ****** @ microsof t.com ...


>嗨Mike,很高兴看到你考虑VB.NET。 VB中优化的代码。在VB6中,优化的代码将运行很多代码。



好​​的。谢谢比尔。所以你会说声明写得好的VB6

代码可以比vb.net运行快十倍完全有效

语句,



VB6或.NET中编写良好的代码可以比错误运行快十倍
编写代码。两者都提供了大量的性能调整区域。

它们中的任何一个都可能会在

极限中进行调整。


或者你认为它会产生误导?



如果有人只报告一半的故事或

报表,我会称之为误导。比如如果有人说好写的代码可以运行十次

更快而且编写得很糟糕的代码可以运行十倍慢,那么如果有人是b / b
只报告一半的声明,然后是的,这会产生误导。


只是因为有人认为他已经明确告诉他了

知道这些事情以及谁用两种工具编写程序和

我想知道他是否故意制造误导性陈述?



真的吗?当然你没有削减他们说的一半?如果我在vb.general.discussion中读到你的帖子

,那么你似乎就是这么做的。对我来说也许你是

只是想在这里恶作剧,不是吗?


>

什么你认为?那里的其他人怎么想呢?我被误导了吗?



或者你是误导? ;)



I''m trying to decide whether or not I need to move to a different
development tool and I''m told that VB6 code, when well written, can be ten
times faster than vb.net, but that if its badly written it can be ten times
slower. Is that correct?

I''m quite competent at writing code myself and so most of my code will be
quite well written, and I don''t want to move to vb.net if well written VB6
code is ten times faster. Have I been told the truth? Or do I need to look
into this further?

Mike

解决方案

Hi Mike,

Great to see you considering VB.NET. Optimized code in VB.NEt will run
much a muchness with optimized code in VB6. The questions are how hard is
that to write and maintain and do you need extra functionality. These are
the reasons you should be looking at .NET.
Note: simple apps (single tier, few components) will have a larger startup
hit in .NET compared to VB6, but once past that initial load the .NET apps
typically allocate objects more efficiently. A typical example is a long
running server app, where .NET GC management makes it very robust and
scalable.
One other reason you might want to consider .NET is for 64 bit applications.

But as to actual speed, well when all is said and done, for simple
operations they both eventually become X86 operations. I have written VB6
apps that have been faster than C++ apps, that was until they let me fix
the C++ code ;) If you have performance critical code, you can do it in
equally in VB6 or .NET.
"Mike Williams" <mi***@whiskyandCoke.comwrote in message
news:eu**************@TK2MSFTNGP05.phx.gbl...

I''m trying to decide whether or not I need to move to a different
development tool and I''m told that VB6 code, when well written, can be ten
times faster than vb.net, but that if its badly written it can be ten
times slower. Is that correct?

I''m quite competent at writing code myself and so most of my code will be
quite well written, and I don''t want to move to vb.net if well written VB6
code is ten times faster. Have I been told the truth? Or do I need to look
into this further?

Mike


"Bill McCarthy" <Bi**@N0SPAM.comwrote in message
news:41**********************************@microsof t.com...

Hi Mike, Great to see you considering VB.NET. Optimized
code in VB.NEt will run much a muchness with optimized
code in VB6.

Okay. Thanks Bill. So would you say that the statement "well written VB6
code can run ten times faster than vb.net" to be a perfectly valid
statement, or would you consider it to be misleading?

It''s just that I''ve been definitely told that by someone who reckons he
knows about these things and who has written programs in both tools and I''m
wondering if he is making a deliberately misleading statement? What do you
think? And what do others here think about it? Am I being misled?

Mike



"Mike Williams" <mi***@whiskyandCoke.comwrote in message
news:eG**************@TK2MSFTNGP04.phx.gbl...

"Bill McCarthy" <Bi**@N0SPAM.comwrote in message
news:41**********************************@microsof t.com...

>Hi Mike, Great to see you considering VB.NET. Optimized
code in VB.NEt will run much a muchness with optimized
code in VB6.


Okay. Thanks Bill. So would you say that the statement "well written VB6
code can run ten times faster than vb.net" to be a perfectly valid
statement,

Well written code in either VB6 or .NET can run ten times faster than badly
written code. Both offer vast areas for performance tweaking.
There''s probably corners of either of them where you can tweak things in
extremes.

or would you consider it to be misleading?

I would call it misleading if someone was to report only half the story or
statements. Such as if someone said Well written code can run ten times
faster and badly written code can run ten times slower, then if someone was
to only report half that statement, then yes that would be misleading.

It''s just that I''ve been definitely told that by someone who reckons he
knows about these things and who has written programs in both tools and
I''m wondering if he is making a deliberately misleading statement?

Really ? Sure you didn''t cut what they said in half ? If I read your post
in vb.general.discussion, it seems you did. Seems to me perhaps you are
just trying to be mischievous here, no ?

>
What do you think? And what do others here think about it? Am I being
misled?

Or are you being misleading ? ;)




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

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