I did a test just now. The test results are as follows:
<%
starttime = timer
'=== super connection ================ ======================< br> function linkto (strurl, strtext, strtype, Strid, strclass, strtitle)
If Len (strtext) = 0 then
response. write "parameter error! "
exit function
end if
If Len (strtype) = 0 then
strtype =" location. href "
else
strtype = strtype &". open "
end if
If Len (strtitle) <> 0 then
strtitle = "Title =" & strtitle & "
else
strtitle =" Title = "& strtext & "
end if
If Len (strurl) = 0 then strurl = "#"
If Len (Strid) <> 0 then Strid = "id =" & Strid & "
If Len (strclass) <> 0 then strclass = "class =" & strclass & "
linkto =" "& strtext &" "
end function
for I = 0 to 2000
If I> = 2000 then exit for
Response. Write linkto ("? Show = best/"& boardid & extname &" "," EssenceArticle","","","","")
Next
Endtime = Timer
Response. Write ("<br>") & vbcrlf
Response. Write (endtime-starttime) * 1000
%>
The test runs for about 46 milliseconds.
<%
Starttime = Timer
For I = 0 to 2000
If I> = 2000 then exit
Response. Write "<a href = '? Show = best/"& boardid & extname &" '> excellent articles </a>"
Next
Endtime = Timer
Response. Write ("<br>") & vbcrlf
Response. Write (endtime-starttime) * 1000
%>
The test runs for about 15 ms.
The above two tests are performed on the local machine, and each cycle is 2000 times. The results are clear at a glance. The final conclusion is that ASP calls to functions will affectProgramPerformance.