The performance of predefined objects in ASP|ASP内置对象的性能 [Permalink]
Fri Mar 17 16:06:49 CST 2006
代码片断一:
<% Dim localArray(5000) for i = 0 to ubound(localArray) randomize localArray(i) = rnd()*1000 next application("tester") = localArray start = timer for i = 0 to ubound(application("tester")) if application("tester")(i) > 800 then application("tester")(i) = 800 end if if application("tester")(i) > 700 then application("tester")(i) = 700 end if if application("tester")(i) > 600 then application("tester")(i) = 600 end if if application("tester")(i) > 500 then application("tester")(i) = 500 end if next response.write formatnumber((timer - start), 2, -1) %>
<% Dim localArray(5000), localArray2 for i = 0 to ubound(localArray) randomize localArray(i) = rnd()*1000 next application("tester") = localArray start = timer localArray2 = application("tester") for i = 0 to ubound(localArray2) if localArray2(i) > 800 then localArray2(i) = 800 end if if localArray2(i) > 700 then localArray2(i) = 700 end if if localArray2(i) > 600 then localArray2(i) = 600 end if if localArray2(i) > 500 then localArray2(i) = 500 end if next response.write formatnumber((timer - start), 2, -1) %>
Posted by: miles
Comments on this entry