VB.NET Express速度问题 [英] VB.NET Express speed issue

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

问题描述




我已经编写了一个程序,用于处理VB.NET 2005 Express中的股票市场价格数据。我已经尽可能地优化了代码,例如: -

使用数组,不将参数传递给函数等...


代码很慢,因为它处理大量数据很多次。


然而,有没有办法将代码编译成其他格式来制作它

运行得更快?我听说过C ++(对我来说太难了)。


VB.NET的全付费版本是否比快递版本更快地运行代码

版本?


非常感谢,

Alex

解决方案



" Ali Chambers" < in ** @ alexchambers.co.ukwrote in message

news:11 ********************** @ h48g2000cwc.googlegr oups.com ...





我写了一个处理股票市场价格数据的程序

VB.NET 2005 Express。我已经尽可能地优化了代码,例如: -

使用数组,不将参数传递给函数等...


代码很慢,因为它处理大量数据很多次。


然而,有没有办法将代码编译成其他格式来制作它

运行得更快?我听说过C ++(对我来说太难了)。


VB.NET的全付费版本是否比快递版本更快地运行代码

版本?



不,它是一样的。如果您发布一个简单的示例程序来说明您的

性能问题,那么您可能会得到一些建议。


David


Ali Chambers写道:


我写了一个处理股票市场价格数据的程序

VB.NET 2005 Express。我已经尽可能地优化了代码,例如: -

使用数组,不将参数传递给函数等...



为什么你认为将函数传递给函数会导致任何明显的性能损失?


>

代码很慢,因为它处理大量数据很多次。



你说代码很慢,你是怎么测量的?您正在处理的数据的大小是多少

,需要多长时间?

你觉得它应该*需要多长时间?你的比较基础是什么?


根据80/20规则,该程序80%的时间仅花费在
20%的代码上。那20%的代码应首先测量

,然后根据需要再测量剩下的代码。我建议得到一个代码

profiler,找出实际存在的瓶颈,然后开始调查你的调查。


从那以后。净中间代码是JIT编译成本机机器代码,

它不应该比其他代码运行得慢。


祝你好运


Ali,


除了其他人,


我认为我们很特别在数组部分中,因为使用真正的

数组'经常会减慢这个过程。


来自Microsoft的所有托管代码程序语言创建相同的结尾代码在

每节经文并且以相同的速度运行。


Cor


" Ali Chambers" < in ** @ alexchambers.co.ukschreef in bericht

news:11 ********************** @ h48g2000cwc.googlegr oups.com ...





我写了一个处理股票市场价格数据的程序

VB.NET 2005 Express。我已经尽可能地优化了代码,例如: -

使用数组,不将参数传递给函数等...


代码很慢,因为它处理大量数据很多次。


然而,有没有办法将代码编译成其他格式来制作它

运行得更快?我听说过C ++(对我来说太难了)。


VB.NET的全付费版本是否比快递版本更快地运行代码

版本?


非常感谢,

Alex



Hi,

I''ve written a programme that processes stock market price data in
VB.NET 2005 Express. I''ve optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I''ve heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?

Many thanks,
Alex

解决方案


"Ali Chambers" <in**@alexchambers.co.ukwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...

Hi,

I''ve written a programme that processes stock market price data in
VB.NET 2005 Express. I''ve optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I''ve heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?

No it''s the same. If you post a simple sample program that illustrates your
performance problem you''re likely to get some advice.

David


Ali Chambers wrote:

I''ve written a programme that processes stock market price data in
VB.NET 2005 Express. I''ve optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

Why would you think that passing parameters to functions would result
in any appreciable performance loss?

>
The code is slow because it is processing large amounts of data many
many times.

You say the code is slow, how did you measure this? What is the size
of the data you are processing and how long does it take? How long do
you think it *should* take? What is your basis for comparison?

According to the 80/20 rule, the program spends 80% of the time in only
20% of the code. That 20% of the code is what should be measured first
and then the remaining code as needed. I suggest getting a code
profiler and finding out where the bottlenecks actually lie and start
your investigation there.

Since .Net intermediate code is JIT compiled into native machine code,
it should not run any slower than other code.

Good Luck


Ali,

In addition to the others,

I think that we are special intereste in that array part, because using real
array''s slows down often the process.

All managed code program language from Microsoft create the same end code in
every versie and run all at the same speed.

Cor

"Ali Chambers" <in**@alexchambers.co.ukschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...

Hi,

I''ve written a programme that processes stock market price data in
VB.NET 2005 Express. I''ve optimised the code as much as possible, eg:-
using arrays, not passing parameters to functions, etc...

The code is slow because it is processing large amounts of data many
many times.

However, is there a way to compile the code to other formats to make it
run faster? I''ve heard of C++ (too difficult for me).

Does the Full Paid Version of VB.NET run code faster than the express
version?

Many thanks,
Alex



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

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