VB.NET与CFMX滴答计数分布? [英] VB.NET vs CFMX tick count distribution?

查看:52
本文介绍了VB.NET与CFMX滴答计数分布?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用ms来比较VB.NET和CFMX执行代码的时间,这些代码在各自的语言中几乎完全相同。 VB.NET中的滴答计数分布

非常紧张,范围从154到190,没有异常值。 CFMX

代码分布在356 - 950和一个异常值1356.为什么

VB.NET代码与CFMX的平均分布非常紧密代码?


谢谢,

Brett

I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why is
the VB.NET code distributed very tightly against the mean vs. the CFMX code?

Thanks,
Brett

推荐答案



你必须更具体 - 发布代码(vb.net和cfml)。


Sam

周五,2004年12月31日06:25:52 -0500,Brett, < no@spam.net>写道:

You''ll have to be more specific--post the code (both vb.net and cfml).

Sam
On Fri, 31 Dec 2004 06:25:52 -0500, "Brett" <no@spam.net> wrote:
我用ms比较了VB.NET和CFMX执行代码的时间,这些代码几乎完全符合各自的语言。 VB.NET中的滴答计数分布非常紧张,范围从154到190,没有异常值。 CFMX
代码分布在356 - 950范围内,一个异常值分布在1356.为什么VB.NET代码与平均值和CFMX代码分布非常紧密?

谢谢,
Brett
I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why is
the VB.NET code distributed very tightly against the mean vs. the CFMX code?

Thanks,
Brett






好的,代码如下。两种语言都连接到邮件服务器,

下载邮件然后通过循环显示每个邮件。


- CFMX -

< cfscript>

ipworksPOPobj = structnew();

ipworksPOPobj = CreateObject(" com"," IPWorksASP5.POP");

ipworksPOPobj.MailServer =" mail.abc.com";

ipworksPOPobj.user =" te ** @ abc.com" ;;

ipworksPOPobj.password =" test";

ipworksPOPobj.connect();

< / cfscript>


< cfloop from =" 1"到= QUOT;#ipworksPOPobj.MessageCount#"指数= QUOT; iMesgNo">

将CFOUTPUT>

将CFSET ipworksPOPobj.MessageNumber = iMesgNo>

将CFSET ipworksPOPobj。 Retrieve()>

主题:#ipworksPOPobj.MessageSubject#< br>

收件人:#ipworksPOPobj.MessageTo#< br>

日期:#ipworksPOPobj.MessageDate#<峰; br>

从:#ipworksPOPobj.MessageFrom#<峰; br>

#ipworksPOPobj.MessageHeaders#<峰; br>< br>

#htmleditformat(ipworksPOPobj.MessageText)#< br>< br> -------------< br>< br>

< / cfoutput>

< / cfloop>

< cfset ipworksPOPobj.Disconnect()>


- VB.NET -


昏暗的开始时间为整数

Label1.Text =""

starttime = Environment.TickCount

Dim mail As New Pop3Mail

ProgressBar1.PerformStep()

mail.Connect(" mail.abc。 com"," te ** @ abc.com"," test")

ProgressBar1.PerformStep()

For each msg As Pop3Mail.Pop3Message in mail.List

ProgressBar1.PerformStep()

Label1.Text = TextBox1.Text& DirectCast(mail.Retrieve(msg),

Pop3Mail.Pop3Message).message

Next

Label1.Text =(Environment.TickCount - starttime )& - - &安培; Label1.Text

starttime = 0

VB.NET POP3Mail方法是Ken Tucker提供的方法(参见主题

''通过下载邮件VB.NET''@ 11:46A于12/30/04)


希望有所帮助。


谢谢,

Brett


" Samuel R. Neff" < BL **** @ newsgroup.nospam>在消息中写道

news:6i ******************************** @ 4ax.com ...
ok, the code follows. Both languags are connecting to a mail server,
downloading messages and then displaying each by looping.

-- CFMX --

<cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject("com", "IPWorksASP5.POP");
ipworksPOPobj.MailServer = "mail.abc.com";
ipworksPOPobj.user = "te**@abc.com";
ipworksPOPobj.password = "test";
ipworksPOPobj.connect();
</cfscript>

<cfloop from="1" to="#ipworksPOPobj.MessageCount#" index="iMesgNo">
<cfoutput>
<cfset ipworksPOPobj.MessageNumber = iMesgNo>
<cfset ipworksPOPobj.Retrieve()>
Subject: #ipworksPOPobj.MessageSubject#<br>
To: #ipworksPOPobj.MessageTo#<br>
Date: #ipworksPOPobj.MessageDate#<br>
From: #ipworksPOPobj.MessageFrom#<br>
#ipworksPOPobj.MessageHeaders#<br><br>
#htmleditformat(ipworksPOPobj.MessageText)#<br><br >-------------<br><br>
</cfoutput>
</cfloop>
<cfset ipworksPOPobj.Disconnect()>

-- VB.NET --

Dim starttime As Integer
Label1.Text = ""
starttime = Environment.TickCount
Dim mail As New Pop3Mail
ProgressBar1.PerformStep()
mail.Connect("mail.abc.com", "te**@abc.com", "test")
ProgressBar1.PerformStep()
For Each msg As Pop3Mail.Pop3Message In mail.List
ProgressBar1.PerformStep()

Label1.Text = TextBox1.Text & DirectCast(mail.Retrieve(msg),
Pop3Mail.Pop3Message).message
Next
Label1.Text = (Environment.TickCount - starttime) & "- -" & Label1.Text
starttime = 0
The VB.NET POP3Mail methods are those provided by Ken Tucker (see thread
''Downloading mail through VB.NET'' @ 11:46A on 12/30/04)

Hope that helps.

Thanks,
Brett

"Samuel R. Neff" <bl****@newsgroup.nospam> wrote in message
news:6i********************************@4ax.com...

你必须更具体 - 发布代码(vb.net和cfml)。

山姆
星期五,2004年12月31日06:25:52 -0500,Brett < no@spam.net>写道:

You''ll have to be more specific--post the code (both vb.net and cfml).

Sam
On Fri, 31 Dec 2004 06:25:52 -0500, "Brett" <no@spam.net> wrote:
我用ms比较了VB.NET和CFMX执行代码的时间,这些代码几乎完全符合各自的语言。 VB.NET中的滴答计数
非常紧凑,范围从154到190,没有异常值。
CFMX
代码分布在356 - 950范围内,一个异常值分布在1356.为什么
是VB.NET代码与CFMX相比非常紧密地分布
代码?

谢谢,
Brett
I have compared, in ms, the time VB.NET and CFMX take to execute code that
is nearly exact in their respective languages. The tick count
distributions
in VB.NET are very tight, ranging from 154 - 190 with no outliers. The
CFMX
code is distributed in the range 356 - 950 and one outlier at 1356. Why
is
the VB.NET code distributed very tightly against the mean vs. the CFMX
code?

Thanks,
Brett





问题可能与你不需要在CFMX中使用COM

对象这一事实有关。如果你通过一个纯Java jar文件(不是一个J#编译的java文件,

但是真正的java字节码)来调用

vb.net调用那么你就是最有可能看到相同的速度和变化速度相同。


尝试使用< cfpop>相反或至少内置的javamail选项

而不是COM对象。这将改善CFMX的性能和

减少变化。


HTH,


Sam


周五,2004年12月31日10:55:22 -0500,Brett < no@spam.com>写道:

The problem is probably related to the fact that you''re using a COM
object in CFMX when you don''t need to. If you were to marshall the
vb.net call through a pure java jar file (not a J# compiled java file,
but real java bytecode) then you''d most likely see the same slower
speed and variability.

Try using <cfpop> instead or at least the built-in javamail options
instead of a COM object. That will improve the CFMX performance and
reduce the variability.

HTH,

Sam

On Fri, 31 Dec 2004 10:55:22 -0500, "Brett" <no@spam.com> wrote:
好,代码如下。两种语言都连接到邮件服务器,下载邮件然后通过循环显示每个邮件。

- CFMX -

< cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject(" com"," IPWorksASP5.POP");
ipworksPOPobj.MailServer =" mail.abc.com" ;;
ipworksPOPobj .user =" te ** @ abc.com" ;;
ipworksPOPobj.password =" test";
ipworksPOPobj.connect();
< / cfscript>

< cfloop from =" 1"到= QUOT;#ipworksPOPobj.MessageCount#"指数= QUOT; iMesgNo">
< CFOUTPUT>
< CFSET ipworksPOPobj.MessageNumber = iMesgNo>
< CFSET ipworksPOPobj.Retrieve()>
主题:# ipworksPOPobj.MessageSubject#<峰; br>
要:#ipworksPOPobj.MessageTo#<峰; br>
日期:#ipworksPOPobj.MessageDate#<峰; br>
来自:#ipworksPOPobj.MessageFrom#< ; br>
#ipworksPOPobj.MessageHeaders#< br>< br>
#htmleditformat(ipworksPOPobj.MessageText)#< br>< br> --------- ----< br>< br>
< / cfoutput>
< / cfloop>
< cfset ipworksPOPobj.Disconnect()>

- VB.NET -

Dim starttime As Integer
Label1.Text =""
starttime = Environment.TickCount
Dim mail As New Pop3Mail
ProgressBar1.PerformStep()
mail.Connect(" mail.abc.com"," te ** @ abc.com"," test")
ProgressBar1.PerformStep ()
For Each msg As Pop3Mail.Pop3Message in mail.List
ProgressBar1.PerformSt ep()

Label1.Text = TextBox1.Text& DirectCast(mail.Retrieve(msg),
Pop3Mail.Pop3Message).message
下一页
Label1.Text =(Environment.TickCount - starttime)& - - &安培; Label1.Text
starttime = 0

VB.NET POP3Mail方法是Ken Tucker提供的方法(参见线程
''通过VB.NET下载邮件''@ 11: 46A于12/30/04)

希望有所帮助。

谢谢,
Brett
ok, the code follows. Both languags are connecting to a mail server,
downloading messages and then displaying each by looping.

-- CFMX --

<cfscript>
ipworksPOPobj = structnew();
ipworksPOPobj = CreateObject("com", "IPWorksASP5.POP");
ipworksPOPobj.MailServer = "mail.abc.com";
ipworksPOPobj.user = "te**@abc.com";
ipworksPOPobj.password = "test";
ipworksPOPobj.connect();
</cfscript>

<cfloop from="1" to="#ipworksPOPobj.MessageCount#" index="iMesgNo">
<cfoutput>
<cfset ipworksPOPobj.MessageNumber = iMesgNo>
<cfset ipworksPOPobj.Retrieve()>
Subject: #ipworksPOPobj.MessageSubject#<br>
To: #ipworksPOPobj.MessageTo#<br>
Date: #ipworksPOPobj.MessageDate#<br>
From: #ipworksPOPobj.MessageFrom#<br>
#ipworksPOPobj.MessageHeaders#<br><br>
#htmleditformat(ipworksPOPobj.MessageText)#<br><br >-------------<br><br>
</cfoutput>
</cfloop>
<cfset ipworksPOPobj.Disconnect()>

-- VB.NET --

Dim starttime As Integer
Label1.Text = ""
starttime = Environment.TickCount
Dim mail As New Pop3Mail
ProgressBar1.PerformStep()
mail.Connect("mail.abc.com", "te**@abc.com", "test")
ProgressBar1.PerformStep()
For Each msg As Pop3Mail.Pop3Message In mail.List
ProgressBar1.PerformStep()

Label1.Text = TextBox1.Text & DirectCast(mail.Retrieve(msg),
Pop3Mail.Pop3Message).message
Next
Label1.Text = (Environment.TickCount - starttime) & "- -" & Label1.Text
starttime = 0
The VB.NET POP3Mail methods are those provided by Ken Tucker (see thread
''Downloading mail through VB.NET'' @ 11:46A on 12/30/04)

Hope that helps.

Thanks,
Brett


这篇关于VB.NET与CFMX滴答计数分布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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