再论程序的执行速度的问题,(续asp,php和jsp 等动态编程)

80酷酷网    80kuku.com

  js|编程|程序|动态|速度|问题|执行


    大家好,我以前曾经写过一篇 几种动态编程语言的 比较的文章(具体情况请看:http://www.asp888.net/lanmu/viewarticle.asp?id=17),当时对 asp 的评分很低,因为当时的jsp 确实太好了,还没有一种技术在当时能赶得上jsp,现在 MS 推出的 .net 战略,以及相应的asp.net(就是asp+),改变了这种情况
关于 asp+ 的其他的问题,豆腐的站点上已经写了很多的 文章了,我就在这里来再次比较一下
程序的运行速度的问题,请看程序
<%
Dim intStart,intStop As DateTime
Dim timeUse As TimeSpan
dim Sum,i,j as int32
intStart = DateTime.Now
for i=1 to 20000
for j=1 to 20000
Sum=Sum + i
next
next
intStop = DateTime.Now
timeUse = intStop.Subtract(intStart)
Response.Write (TimeSpan.ToString(timeUse))
%>
请看输出:是 3。6 秒左右,老天,速度真的是好快呀,达到了jsp 同等的运行效果,因为他们同样采用了 预编译(preCompile)的原因,怎么样,Cool 吧!


分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: