一聚教程网:一个值得你收藏的教程网站

热门教程

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

时间:2022-07-02 22:56:02 编辑:袖梨 来源:一聚教程网

/*
豆腐制作,都是精品
豆腐技术站
如转载 请注明出处
*/
大家好,我以前曾经写过一篇 几种动态编程语言的 比较的文章(具体情况请看: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 吧!
作者:豆腐(原创)

热门栏目